I could have sworn the base class method was there.
[p5sagit/p5-mst-13.2.git] / lib / Shell.pm
index 9762a3a..e300d79 100644 (file)
@@ -4,9 +4,9 @@ use strict;
 use warnings;
 our($capture_stderr, $VERSION, $AUTOLOAD);
 
-$VERSION = '0.4';
+$VERSION = '0.5';
 
-sub new { bless \$VERSION, shift } # Nothing better to bless
+sub new { bless \my $foo, shift }
 sub DESTROY { }
 
 sub import {
@@ -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') {