Michael Schroeder's fix for re-try if stdio ops after
[p5sagit/p5-mst-13.2.git] / lib / Shell.pm
index 5d2f217..81b2598 100644 (file)
@@ -1,5 +1,5 @@
 package Shell;
-use 5.6.1;
+use 5.006_001;
 use strict;
 use warnings;
 our($capture_stderr, $VERSION, $AUTOLOAD);
@@ -30,6 +30,7 @@ sub AUTOLOAD {
     $cmd =~ s/^.*:://;
     eval <<"*END*";
        sub $AUTOLOAD {
+           shift if ref \$_[0] && \$_[0]->isa( 'Shell' );
            if (\@_ < 1) {
                \$Shell::capture_stderr ? `$cmd 2>&1` : `$cmd`;
            } elsif ('$^O' eq 'os2') {