summaryrefslogtreecommitdiff
path: root/t/cmd
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-07-02 12:29:48 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-09-15 22:44:54 -0700
commit945534e1d3d80e5758511e1e2700775217d07796 (patch)
tree6a6cf3080f8b011434fd1a337bef9f4fc9bd01e2 /t/cmd
parent39075fb14ee634cbc405da5ce45b841c659549a6 (diff)
downloadperl-945534e1d3d80e5758511e1e2700775217d07796.tar.gz
lexsub.t: Fix a test
This is not testing what I meant it to test: that ‘sub d’ will respect a preceding ‘our sub d;’. If ‘sub d’ is in the same package, it makes no difference, so the test tests nothing. It turns out this does not work yet.
Diffstat (limited to 't/cmd')
-rw-r--r--t/cmd/lexsub.t7
1 files changed, 3 insertions, 4 deletions
diff --git a/t/cmd/lexsub.t b/t/cmd/lexsub.t
index 0b35964ebb..0732678307 100644
--- a/t/cmd/lexsub.t
+++ b/t/cmd/lexsub.t
@@ -5,7 +5,7 @@ BEGIN {
require './test.pl';
*bar::is = *is;
}
-plan 14;
+plan 13;
{
our sub foo { 42 }
@@ -59,11 +59,10 @@ sub bar::c { 43 }
}
{
our sub d;
- sub d { 'd42' }
sub bar::d { 'd43' }
package bar;
+ sub d { 'd42' }
{ local $::TODO = ' ';
- is d, 'd42', 'our sub foo; applies to subsequent sub foo {}';
+ is eval { ::d },'d42', 'our sub foo; applies to subsequent sub foo {}';
}
- is &d, 'd42', 'our sub foo; applies to subsequent sub foo {} (amper)';
}