summaryrefslogtreecommitdiff
path: root/lib/SelfLoader.pm
diff options
context:
space:
mode:
authorAndreas König <a.koenig@mind.de>1998-07-12 10:22:16 +0200
committerGurusamy Sarathy <gsar@cpan.org>1998-07-12 06:29:23 +0000
commit52128c7bef3f076ac01499c67c282a95011ff34a (patch)
treee78cf8deb6a5c33d29e52477ccc5dcd1c1eccb58 /lib/SelfLoader.pm
parent5c0ca7990f0d90291b9a3d0b6c57bae560b23b52 (diff)
downloadperl-52128c7bef3f076ac01499c67c282a95011ff34a.tar.gz
[5.004_71] Patch: let CPAN.pm work with threaded perl
Message-Id: <sfck95jtwpz.fsf@dubravka.in-berlin.de> p4raw-id: //depot/perl@1449
Diffstat (limited to 'lib/SelfLoader.pm')
-rw-r--r--lib/SelfLoader.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/SelfLoader.pm b/lib/SelfLoader.pm
index f93841c862..a73f68a8c4 100644
--- a/lib/SelfLoader.pm
+++ b/lib/SelfLoader.pm
@@ -3,7 +3,8 @@ use Carp;
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(AUTOLOAD);
-$VERSION = 1.07; sub Version {$VERSION}
+$VERSION = "1.08";
+sub Version {$VERSION}
$DEBUG = 0;
my %Cache; # private cache for all SelfLoader's client packages
@@ -45,6 +46,7 @@ sub _load_stubs {
unless fileno($fh);
$Cache{"${currpack}::<DATA"} = 1; # indicate package is cached
+ local($/) = "\n";
while(defined($line = <$fh>) and $line !~ m/^__END__/) {
if ($line =~ m/^sub\s+([\w:]+)\s*(\([\\\$\@\%\&\*\;]*\))?/) {
push(@stubs, $self->_add_to_cache($name, $currpack, \@lines, $protoype));