summaryrefslogtreecommitdiff
path: root/t/op/coreamp.t
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2015-08-19 13:10:16 -0700
committerRicardo Signes <rjbs@cpan.org>2015-09-29 10:49:19 -0400
commit7fba29668402ec06ad00dfafda69913bcbb2c1df (patch)
tree70b3e0d3f06e47f23571ce6f95c09991ee83b39b /t/op/coreamp.t
parent96f902ff649ca0f75966f5282611d16ecf5f907e (diff)
downloadperl-7fba29668402ec06ad00dfafda69913bcbb2c1df.tar.gz
Disable lexical $_
This just disables the syntax and modifes the tests. The underlying infrastructure has not been removed yet. I had to change a couple of tests in cpan/.
Diffstat (limited to 't/op/coreamp.t')
-rw-r--r--t/op/coreamp.t33
1 files changed, 2 insertions, 31 deletions
diff --git a/t/op/coreamp.t b/t/op/coreamp.t
index b6c94875e5..7a991551a3 100644
--- a/t/op/coreamp.t
+++ b/t/op/coreamp.t
@@ -71,7 +71,7 @@ sub test_proto {
if (!@_) { return }
- $tests += 6;
+ $tests += 3;
my($in,$out) = @_; # for testing implied $_
@@ -83,34 +83,6 @@ sub test_proto {
$_ = $in;
is &{"CORE::$o"}(), $out, "&$o with no args";
-
- # Since there is special code to deal with lexical $_, make sure it
- # works in all cases.
- undef $_;
- {
- no warnings 'experimental::lexical_topic';
- my $_ = $in;
- is &{"CORE::$o"}(), $out, "&$o with no args uses lexical \$_";
- }
- # Make sure we get the right pad under recursion
- my $r;
- $r = sub {
- if($_[0]) {
- no warnings 'experimental::lexical_topic';
- my $_ = $in;
- is &{"CORE::$o"}(), $out,
- "&$o with no args uses the right lexical \$_ under recursion";
- }
- else {
- &$r(1)
- }
- };
- &$r(0);
- no warnings 'experimental::lexical_topic';
- my $_ = $in;
- eval {
- is "CORE::$o"->(), $out, "&$o with the right lexical \$_ in an eval"
- };
}
elsif ($p =~ '^;([$*]+)\z') { # ;$ ;* ;$$ etc.
my $maxargs = length $1;
@@ -1062,8 +1034,7 @@ like $@, qr'^Undefined format "STDOUT" called',
my $warnings;
local $SIG{__WARN__} = sub { ++$warnings };
- no warnings 'experimental::lexical_topic';
- my $_ = 'Phoo';
+ local $_ = 'Phoo';
ok &mymkdir(), '&mkdir';
like <*>, qr/^phoo(.DIR)?\z/i, 'mkdir works with implicit $_';