diff options
author | Jim Cromie <jcromie@cpan.org> | 2005-01-02 23:36:16 -0700 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-01-07 14:30:51 +0000 |
commit | 09e96b99c215ed417c37d0d188dd576c5464c72a (patch) | |
tree | f0311897e0c6eb6d473caa496bbc83165704599f /lib/warnings.pm | |
parent | 5df617be18e4372550725f3369e8e3fd641cce19 (diff) | |
download | perl-09e96b99c215ed417c37d0d188dd576c5464c72a.tar.gz |
Re: [PATCH] Remove Carp from warnings.pm
Message-ID: <cfe85dfa05010305367445dee6@mail.gmail.com>
p4raw-id: //depot/perl@23768
Diffstat (limited to 'lib/warnings.pm')
-rw-r--r-- | lib/warnings.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/warnings.pm b/lib/warnings.pm index 32f020eb94..86e4fcee0a 100644 --- a/lib/warnings.pm +++ b/lib/warnings.pm @@ -6,7 +6,7 @@ package warnings; -our $VERSION = '1.03'; +our $VERSION = '1.04'; =head1 NAME @@ -131,8 +131,6 @@ See L<perlmodlib/Pragmatic Modules> and L<perllexwarn>. =cut -use Carp (); - our %Offsets = ( # Warnings Categories added in Perl 5.008 @@ -300,6 +298,7 @@ $All = "" ; vec($All, $Offsets{'all'}, 2) = 3 ; sub Croaker { + require Carp; delete $Carp::CarpInternal{'warnings'}; Carp::croak(@_); } @@ -473,6 +472,7 @@ sub warn my $message = pop ; my ($callers_bitmask, $offset, $i) = __chk(@_) ; + require Carp; Carp::croak($message) if vec($callers_bitmask, $offset+1, 1) || vec($callers_bitmask, $Offsets{'all'}+1, 1) ; @@ -492,6 +492,7 @@ sub warnif (vec($callers_bitmask, $offset, 1) || vec($callers_bitmask, $Offsets{'all'}, 1)) ; + require Carp; Carp::croak($message) if vec($callers_bitmask, $offset+1, 1) || vec($callers_bitmask, $Offsets{'all'}+1, 1) ; |