in reply to Re: Local for lexicals (KISS)
in thread Local for lexicals
Given
if I replace my $x = 1 by tie my $x, 'Tie', 1, then the given code blows up upon leaving the inner scope.sub Tie::TIESCALAR { return bless \$_[1] => $class } sub Tie::FETCH { return ${$_[0]} } sub Tie::STORE { $_[0] = "I'm not tied any more" }
UPDATE: Oops, $class should be $_[0].
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Local for lexicals (KISS)
by tye (Sage) on Aug 10, 2009 at 21:10 UTC | |
by JadeNB (Chaplain) on Aug 10, 2009 at 21:29 UTC | |
by tye (Sage) on Aug 10, 2009 at 22:20 UTC | |
by JadeNB (Chaplain) on Aug 10, 2009 at 23:17 UTC | |
by JadeNB (Chaplain) on Aug 10, 2009 at 22:52 UTC | |
by tye (Sage) on Aug 10, 2009 at 23:59 UTC |