diff options
author | Karl Williamson <khw@cpan.org> | 2014-06-16 18:56:44 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2014-06-16 19:17:52 -0600 |
commit | e35475dec7197e291306173beba241d4e43bd5b2 (patch) | |
tree | 51cd326cb9614070a7e85e32a649598a7b62ff0d /t/uni | |
parent | f31006c96d4119fe2bd6e9ae42d2dbec49aa2b2c (diff) | |
download | perl-e35475dec7197e291306173beba241d4e43bd5b2.tar.gz |
Fatalize defined(@) and defined{%)
Calling defined on an array or hash has been deprecated and scheduled
for removal in v5.22. This commit does that, removing the tests that
assumed they were defined.
In order to get the line numbers of the errors to display, I combined
the first and second lines of the message, omitting the \n
Diffstat (limited to 't/uni')
-rw-r--r-- | t/uni/gv.t | 14 | ||||
-rw-r--r-- | t/uni/stash.t | 22 |
2 files changed, 2 insertions, 34 deletions
diff --git a/t/uni/gv.t b/t/uni/gv.t index 90a633213e..670bb6a6ad 100644 --- a/t/uni/gv.t +++ b/t/uni/gv.t @@ -14,7 +14,7 @@ use utf8; use open qw( :utf8 :std ); use warnings; -plan( tests => 211 ); +plan( tests => 207 ); # type coersion on assignment $ᕘ = 'ᕘ'; @@ -194,18 +194,6 @@ is (*{*Ẋ{GLOB}}, "*main::STDOUT"); my $a = "Sʎm000"; ok(!defined *{$a}); - { - no warnings 'deprecated'; - ok(!defined @{$a}); - } - ok(!defined *{$a}); - - { - no warnings 'deprecated'; - ok(!defined %{$a}); - } - ok(!defined *{$a}); - ok(!defined ${$a}); ok(!defined *{$a}); diff --git a/t/uni/stash.t b/t/uni/stash.t index 7d24e5178a..3d41e40fd6 100644 --- a/t/uni/stash.t +++ b/t/uni/stash.t @@ -13,7 +13,7 @@ BEGIN { use utf8; use open qw( :utf8 :std ); -plan( tests => 58 ); +plan( tests => 49 ); #These come from op/my_stash.t { @@ -39,35 +39,15 @@ plan( tests => 58 ); #op/stash.t { - { - no warnings 'deprecated'; - ok( defined %왿ퟀⲺa::ᒫṡ::, q(stashes happen to be defined if not used) ); - ok( defined %{"왿ퟀⲺa::ᒫṡ::"}, q(- work with hard refs too) ); - - ok( defined %ᛐⲞɲe::Šꇇᚽṙᆂṗ::, q(stashes are defined if seen at compile time) ); - ok( defined %{"ᛐⲞɲe::Šꇇᚽṙᆂṗ::"}, q(- work with hard refs too) ); - - ok( defined %본go::ଶfʦbᚒƴ::, q(stashes are defined if a var is seen at compile time) ); - ok( defined %{"본go::ଶfʦbᚒƴ::"}, q(- work with hard refs too) ); - } - - package ᛐⲞɲe::Šꇇᚽṙᆂṗ; $본go::ଶfʦbᚒƴ::scalar = 1; package main; - # now tests in eval - - ok( eval { no warnings 'deprecated'; defined %앛hȚꟻࡃҥ:: }, 'works in eval{}' ); - ok( eval q{ no warnings 'deprecated'; defined %Ṧㄘㇹen맠ㄦ:: }, 'works in eval("")' ); - # now tests with strictures { use strict; - no warnings 'deprecated'; - ok( defined %piƓ::, q(referencing a non-existent stash doesn't produce stricture errors) ); ok( !exists $piƓ::{bodine}, q(referencing a non-existent stash element doesn't produce stricture errors) ); } |