package Devel::SelfStubber;
require SelfLoader;
@ISA = qw(SelfLoader);
+@EXPORT = 'AUTOLOAD';
$JUST_STUBS = 1;
$VERSION = 1.01; sub Version {$VERSION}
$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++;
}
$self->_load_stubs($module);
if ( fileno($fh) ) {
$end = 1;
- while($line = <$fh>) {
+ while(defined($line = <$fh>)) {
push(@AFTER_DATA,$line);
}
}
1;
__END__
+
=head1 NAME
Devel::SelfStubber - generate stubs for a SelfLoading module
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