in reply to Re: typeglob reference deletes global lexical
in thread typeglob reference deletes global lexical
During the first call to foo, $_BAR is false, even though it was initialized to 1.
Assuming the value didn't change, that usually means that foo was called before the assignment occurred.
use strict; use warnings; my $x = 1; sub foo { print("[$x]\n"); } BEGIN { foo(); } # Prints "[]" and gives an undefined warning.
Or since you're doing symtab manipulations, maybe it's getting clobbered by something. But that would mean the variable isn't a lexical (my) variable as you claim it is.
Seeing you didn't provide code that reproduces the problem, there's not much we can do.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: typeglob reference deletes global lexical
by robnagler (Novice) on Nov 08, 2008 at 02:46 UTC | |
by ikegami (Patriarch) on Nov 08, 2008 at 05:15 UTC |