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 /warnings.pl | |
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 'warnings.pl')
-rw-r--r-- | warnings.pl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/warnings.pl b/warnings.pl index c22d110eee..d342a39fa6 100644 --- a/warnings.pl +++ b/warnings.pl @@ -437,7 +437,14 @@ __END__ 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 |