orpackage Foo; my $x; sub set_x { validate($_[0]); $x = $_[0]; } sub get_x { die("uninitialized") if !defined($x); $x } 1;
{ my $x; sub set_x { validate($_[0]); $x = $_[0]; } sub get_x { die("uninitialized") if !defined($x); $x } }
In reply to Re^4: closure clarity, please
by ikegami
in thread closure clarity, please
by 7stud
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |