summaryrefslogtreecommitdiff
path: root/lib/strict.pm
diff options
context:
space:
mode:
authorJohan Vromans <jvromans@squirrel.nl>2007-04-25 18:12:58 +0200
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-04-26 10:51:36 +0000
commite3def60f2e5ccd1bf34656c3a5e1691f3bdc48a9 (patch)
tree9c2128ee1837af849384fcbe30051d4c40a82578 /lib/strict.pm
parent32e6a07c84b153f78f946de50870bc0ee030624f (diff)
downloadperl-e3def60f2e5ccd1bf34656c3a5e1691f3bdc48a9.tar.gz
Re: The Strict trap
Message-ID: <m2lkggilud.fsf@phoenix.squirrel.nl> p4raw-id: //depot/perl@31082
Diffstat (limited to 'lib/strict.pm')
-rw-r--r--lib/strict.pm13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/strict.pm b/lib/strict.pm
index d14391add4..bcb1321613 100644
--- a/lib/strict.pm
+++ b/lib/strict.pm
@@ -1,6 +1,13 @@
package strict;
-$strict::VERSION = "1.03";
+$strict::VERSION = "1.04";
+
+# Verify that we're called correctly so that strictures will work.
+unless ( __FILE__ =~ /(^|[\/\\])\Q@{[__PACKAGE__]}\E\.pm$/ ) {
+ # Can't use Carp, since Carp uses us!
+ my (undef, $f, $l) = caller;
+ die("Incorrect use of pragma '@{[__PACKAGE__,]}' at $f line $l.\n");
+}
my %bitmask = (
refs => 0x00000002,
@@ -133,4 +140,8 @@ if unknown restrictions are used, the strict pragma will abort with
Unknown 'strict' tag(s) '...'
+As of version 1.04 (Perl 5.10), strict verifies that it is used as
+"strict" to avoid the dreaded Strict trap on case insensitive file
+systems.
+
=cut