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.
require './test.pl';
*bar::is = *is;
}
-plan 14;
+plan 13;
{
our sub foo { 42 }
}
{
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)';
}