X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fwarnings.pm;h=06e25c58ad941c1cad53b116af4b22ea723a85ce;hb=192b9cd13b3ba000f1d0a2d32c141b9513be7936;hp=635993bbd83b5f14713749ea6e84684a2b78e313;hpb=2db3864ffcaccbf832bbb3814303b4f6beef8963;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/warnings.pm b/lib/warnings.pm index 635993b..06e25c5 100644 --- a/lib/warnings.pm +++ b/lib/warnings.pm @@ -1,4 +1,4 @@ - +# -*- buffer-read-only: t -*- # !!!!!!! DO NOT EDIT THIS FILE !!!!!!! # This file was created by warnings.pl # Any changes made here will be lost. @@ -6,7 +6,14 @@ package warnings; -our $VERSION = '1.04'; +our $VERSION = '1.06'; + +# Verify that we're called correctly so that warnings will work. +# see also strict.pm. +unless ( __FILE__ =~ /(^|[\/\\])\Q@{[__PACKAGE__]}\E\.pm$/ ) { + my (undef, $f, $l) = caller; + die("Incorrect use of pragma '@{[__PACKAGE__,]}' at $f line $l.\n"); +} =head1 NAME @@ -295,7 +302,8 @@ $All = "" ; vec($All, $Offsets{'all'}, 2) = 3 ; sub Croaker { - require Carp; + require Carp::Heavy; # this initializes %CarpInternal + local $Carp::CarpInternal{'warnings'}; delete $Carp::CarpInternal{'warnings'}; Carp::croak(@_); } @@ -498,3 +506,4 @@ sub warnif } 1; +# ex: set ro: