diff options
author | Steffen Mueller <wyp3rlx02@sneakemail.com> | 2008-08-02 19:38:39 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-08-04 09:38:35 +0000 |
commit | f9a01fbf80a2dfff95a408098b4f01fe2a12e140 (patch) | |
tree | 7c863babcff3f8b517e5f3c73e71cfe4bfd200f4 /lib | |
parent | f7c69158501ed4705d71f069f23211f56bd55a2e (diff) | |
download | perl-f9a01fbf80a2dfff95a408098b4f01fe2a12e140.tar.gz |
Tiny SelfLoader patch for better warnings
Message-ID: <20080802153839.9538.qmail@lists.develooper.com>
Date: Sat, 02 Aug 2008 17:38:39 +0200
p4raw-id: //depot/perl@34170
Diffstat (limited to 'lib')
-rw-r--r-- | lib/SelfLoader.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/SelfLoader.pm b/lib/SelfLoader.pm index 5605c25742..0288b2bd22 100644 --- a/lib/SelfLoader.pm +++ b/lib/SelfLoader.pm @@ -1,7 +1,7 @@ package SelfLoader; use 5.008; use strict; -our $VERSION = "1.15"; +our $VERSION = "1.16"; # The following bit of eval-magic is necessary to make this work on # perls < 5.009005. @@ -163,7 +163,8 @@ sub _add_to_cache { return () unless $fullname; carp("Redefining sub $fullname") if exists $Cache{$fullname}; - $Cache{$fullname} = join('', "package $pack; ",@$lines); + $Cache{$fullname} = join('', "\n\#line 1 \"sub $fullname\"\npackage $pack; ", @$lines); + #$Cache{$fullname} = join('', "package $pack; ",@$lines); print STDERR "SelfLoader cached $fullname: $Cache{$fullname}" if DEBUG; # return stub to be eval'd defined($protoype) ? "sub $fullname $protoype;" : "sub $fullname;" |