From: Rafael Garcia-Suarez Date: Wed, 10 Oct 2007 08:17:07 +0000 (+0000) Subject: If we use @{[]} (a.k.a. baby-cart) interpolation, we got warnings X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5108dc18037af131227ae095719eaab3a8fd54cb;p=p5sagit%2Fp5-mst-13.2.git If we use @{[]} (a.k.a. baby-cart) interpolation, we got warnings when $" is undefined. p4raw-id: //depot/perl@32090 --- diff --git a/lib/strict.pm b/lib/strict.pm index 3616753..053aae7 100644 --- a/lib/strict.pm +++ b/lib/strict.pm @@ -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 = ( diff --git a/lib/warnings.pm b/lib/warnings.pm index 679a883..79a5aa8 100644 --- a/lib/warnings.pm +++ b/lib/warnings.pm @@ -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 diff --git a/warnings.pl b/warnings.pl index 148b408..4168c58 100644 --- a/warnings.pl +++ b/warnings.pl @@ -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