in reply to (tye)Re: Inner Subroutines, mod_perl, and Segfaults
in thread Inner Subroutines, mod_perl, and Segfaults
A named sub declared at any point in a package (even inside an eval()) gets installed into the symbol table.
I guess this test shows the difference, not that I'd do this in practice:
We get the ever-popular "variable will not stay shared" message familiar to mod_perl hackers.sub do_this { my $arg = shift; my $foo = "bar"; sub do_that { print "Arg is: $arg!\n"; print "Foo is: $foo!\n"; } } do_this(1); do_that();
Thanks for the clarification.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: (tye)Re: Inner Subroutines, mod_perl, and Segfaults
by tilly (Archbishop) on Jan 26, 2001 at 06:37 UTC |