This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
move the SETJMP exception-handing definitions from scope.h to cop.h
[perl5.git] / warnings.pl
index aae186e..e7659b9 100644 (file)
@@ -49,7 +49,6 @@ my $tree = {
                'misc'          => [ 5.008, DEFAULT_OFF],
                'regexp'        => [ 5.008, DEFAULT_OFF],
                'glob'          => [ 5.008, DEFAULT_OFF],
-               'y2k'           => [ 5.008, DEFAULT_OFF],
                'untie'         => [ 5.008, DEFAULT_OFF],
        'substr'        => [ 5.008, DEFAULT_OFF],
        'taint'         => [ 5.008, DEFAULT_OFF],
@@ -477,7 +476,7 @@ __END__
 
 package warnings;
 
-our $VERSION = '1.03';
+our $VERSION = '1.04';
 
 =head1 NAME
 
@@ -602,14 +601,13 @@ See L<perlmodlib/Pragmatic Modules> and L<perllexwarn>.
 
 =cut
 
-use Carp ();
-
 KEYWORDS
 
 $All = "" ; vec($All, $Offsets{'all'}, 2) = 3 ;
 
 sub Croaker
 {
+    require Carp;
     delete $Carp::CarpInternal{'warnings'};
     Carp::croak(@_);
 }
@@ -783,6 +781,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) ;
@@ -802,6 +801,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) ;