more consting
[p5sagit/p5-mst-13.2.git] / lib / warnings.pm
index 7822f92..06e25c5 100644 (file)
@@ -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