File::Path::rmtree() doesn't delete stale symlinks correctly
[p5sagit/p5-mst-13.2.git] / lib / Devel / SelfStubber.pm
index 0a8caad..4c2d039 100644 (file)
@@ -1,6 +1,7 @@
 package Devel::SelfStubber;
 require SelfLoader;
 @ISA = qw(SelfLoader);
+@EXPORT = 'AUTOLOAD';
 $JUST_STUBS = 1;
 $VERSION = 1.01; sub Version {$VERSION}
 
@@ -34,7 +35,7 @@ sub stub {
     $fh = "${module}::DATA";
 
     open($fh,$mod_file) || die "Unable to open $mod_file";
-    while($line = <$fh> and $line !~ m/^__DATA__/) {
+    while(defined ($line = <$fh>) and $line !~ m/^__DATA__/) {
        push(@BEFORE_DATA,$line);
        $line =~ /use\s+SelfLoader/ && $found_selfloader++;
     }
@@ -44,7 +45,7 @@ sub stub {
     $self->_load_stubs($module);
     if ( fileno($fh) ) {
        $end = 1;
-       while($line = <$fh>) {
+       while(defined($line = <$fh>)) {
            push(@AFTER_DATA,$line);
        }
     }
@@ -117,7 +118,7 @@ So, for classes and subclasses to have inheritance correctly
 work with autoloading, you need to ensure stubs are loaded.
 
 The SelfLoader can load stubs automatically at module initialization
-with the statement 'SelfLoader->load_stubs()';, but you may wish to
+with the statement 'SelfLoader-E<gt>load_stubs()';, but you may wish to
 avoid having the stub loading overhead associated with your
 initialization (though note that the SelfLoader::load_stubs method
 will be called sooner or later - at latest when the first sub