diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-04-26 12:47:57 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-04-26 12:47:57 +0000 |
commit | f2c3e82948673f4d7e5fb945151780b94dc3862a (patch) | |
tree | 8d1226a3b5b8b39063a81024275ecfc38ac23015 /lib/warnings.pm | |
parent | e9e03e16875c2b55d3621425adb98b63af46989f (diff) | |
download | perl-f2c3e82948673f4d7e5fb945151780b94dc3862a.tar.gz |
Do the same thing as change #31082, but for warnings.pm.
p4raw-link: @31082 on //depot/perl: e3def60f2e5ccd1bf34656c3a5e1691f3bdc48a9
p4raw-id: //depot/perl@31084
Diffstat (limited to 'lib/warnings.pm')
-rw-r--r-- | lib/warnings.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/warnings.pm b/lib/warnings.pm index 74287f07c5..06e25c58ad 100644 --- a/lib/warnings.pm +++ b/lib/warnings.pm @@ -6,7 +6,14 @@ package warnings; -our $VERSION = '1.05'; +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 |