Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[S02-names/caller.t] in $*foo, the twigil is an integral part of the …
…name
  • Loading branch information
sorear committed Aug 2, 2011
1 parent 10846df commit a2e0a5a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions S02-names/caller.t
Expand Up @@ -116,10 +116,9 @@ plan 18;
is $_, 43, '$_ is implicitly rw (2)';
}

#?niecza 2 skip 'pending confirmation'
{
my sub modify { $CALLER::foo++ }
my $*foo is dynamic = 42;
my $foo is dynamic = 42;
#?pugs 2 todo 'bug'
lives_ok { modify() },
'"is dynamic" vars declared "is rw" are rw when accessed with $CALLER:: (1)';
Expand All @@ -128,10 +127,10 @@ plan 18;
}

{
my sub get_foo { try { $*foo } }
my sub get_foo { try { $DYNAMIC::foo } }
my $foo is dynamic = 42;

is get_foo(), 42, '$* is short for $CONTEXT::';
is get_foo(), 42, '$DYNAMIC:: searches call stack';
}

# Rebinding caller's variables -- legal?
Expand Down

0 comments on commit a2e0a5a

Please sign in to comment.