[VPM] Symbolic references with use strict in effect.
Peter Scott
Peter at psdt.com
Mon Jun 5 07:51:42 PDT 2006
At 9:26 AM -0700 6/4/06, Adam Parkin wrote:
>First off, sorry Darren I didn't mean to send this message to your
>personal account, but when I hit "reply" to your VPM post Thunderbird
>automatically put your address in the "To" field instead of
>"victoria-pm at pm.org", and I didn't notice this until after I had hit "send".
>
>Darren Duncan wrote:
>> One solution is to turn off strict for just that line of code, and
>> have it on for the rest of the file.
>
>Hmm, okay, I like that idea: only having strict off for a block of code,
>but on everywhere else. But wouldn't the "no strict" still apply to the
>subroutines that get called?
No, its scope is lexical, not dynamic.
>use strict;
>
>{
> no strict;
> my $nameOfSub = "foo";
> &$nameOfSub ($args);
>}
>
>sub foo {
> # in here no strict is still in effect
No it isn't.
>so I could do something like
No you couldn't :-)
More information about the Victoria-pm
mailing list