This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
If we use @{[]} (a.k.a. baby-cart) interpolation, we got warnings
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Wed, 10 Oct 2007 08:17:07 +0000 (08:17 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Wed, 10 Oct 2007 08:17:07 +0000 (08:17 +0000)
when $" is undefined.

p4raw-id: //depot/perl@32090

lib/strict.pm
lib/warnings.pm
warnings.pl

index 3616753..053aae7 100644 (file)
@@ -3,10 +3,10 @@ package strict;
 $strict::VERSION = "1.04";
 
 # Verify that we're called correctly so that strictures will work.
-unless ( __FILE__ =~ /(^|[\/\\])\Q@{[__PACKAGE__]}\E\.pmc?$/ ) {
+unless ( __FILE__ =~ /(^|[\/\\])\Q${\__PACKAGE__}\E\.pmc?$/ ) {
     # Can't use Carp, since Carp uses us!
     my (undef, $f, $l) = caller;
-    die("Incorrect use of pragma '@{[__PACKAGE__,]}' at $f line $l.\n");
+    die("Incorrect use of pragma '${\__PACKAGE__}' at $f line $l.\n");
 }
 
 my %bitmask = (
index 679a883..79a5aa8 100644 (file)
@@ -10,9 +10,9 @@ our $VERSION = '1.06';
 
 # Verify that we're called correctly so that warnings will work.
 # see also strict.pm.
-unless ( __FILE__ =~ /(^|[\/\\])\Q@{[__PACKAGE__]}\E\.pmc?$/ ) {
+unless ( __FILE__ =~ /(^|[\/\\])\Q${\__PACKAGE__}\E\.pmc?$/ ) {
     my (undef, $f, $l) = caller;
-    die("Incorrect use of pragma '@{[__PACKAGE__,]}' at $f line $l.\n");
+    die("Incorrect use of pragma '${\__PACKAGE__}' at $f line $l.\n");
 }
 
 =head1 NAME
index 148b408..4168c58 100644 (file)
@@ -440,9 +440,9 @@ our $VERSION = '1.06';
 
 # Verify that we're called correctly so that warnings will work.
 # see also strict.pm.
-unless ( __FILE__ =~ /(^|[\/\\])\Q@{[__PACKAGE__]}\E\.pmc?$/ ) {
+unless ( __FILE__ =~ /(^|[\/\\])\Q${\__PACKAGE__}\E\.pmc?$/ ) {
     my (undef, $f, $l) = caller;
-    die("Incorrect use of pragma '@{[__PACKAGE__,]}' at $f line $l.\n");
+    die("Incorrect use of pragma '${\__PACKAGE__}' at $f line $l.\n");
 }
 
 =head1 NAME