From b4155db21af9a8f817d175591c873bccbd919871 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Thu, 1 Sep 2011 08:13:51 -0700 Subject: [PATCH] [perl #97492] Tests & delta for defined ${"::!"} --- pod/perldelta.pod | 11 +++++++---- t/op/magic.t | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/pod/perldelta.pod b/pod/perldelta.pod index bdf1b2d..8cbae63 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -395,11 +395,14 @@ variable had not been used yet. This has been fixed. =item * -C used to return true for most built-in defined -variables, but not others, if they had not been used yet. Many times that -new built-in variables have been added in past versions, this construct was +C, C, etc., used to +return true for most, but not all built-in variables, if +they had not been used yet. Many times that new built-in +variables were added in past versions, this construct was not taken into account, so this affected C<${^GLOBAL_PHASE}> and -C<${^UTF8CACHE}>, among others. +C<${^UTF8CACHE}>, among others. It also used to return false if the +package name was given as well (C<${"::!"}>) and for subroutines in the +CORE package [perl #97978] [perl #97492] [perl #97484]. =item * diff --git a/t/op/magic.t b/t/op/magic.t index 3969673..dd6d28e 100644 --- a/t/op/magic.t +++ b/t/op/magic.t @@ -5,7 +5,7 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; require './test.pl'; - plan (tests => 145); + plan (tests => 147); } # Test that defined() returns true for magic variables created on the fly, @@ -19,7 +19,7 @@ BEGIN { for (qw( SIG ^OPEN ^TAINT ^UNICODE ^UTF8LOCALE ^WARNING_BITS 1 2 3 4 5 6 7 8 9 42 & ` ' : ? ! _ - [ ^ ~ = % . ( ) < > \ / $ | + ; ] ^A ^C ^D - ^E ^F ^H ^I ^L ^N ^O ^P ^S ^T ^V ^W ^UTF8CACHE + ^E ^F ^H ^I ^L ^N ^O ^P ^S ^T ^V ^W ^UTF8CACHE ::12345 main::98732 )) { my $v = $_; # avoid using any global vars here: -- 2.7.4