Sewi has asked for the wisdom of the Perl Monks concerning the following question:
Dear monks,
just found a piece of suspicious source:
use strict; [...] sub foo { no strict 'refs'; my $delete = &$routine_name($row, $nrow, $tablename); use strict 'refs'; }
Does "strict" really work this way? I'd assume that one "no strict refs" within the whole file disables strict refs for the whole file and this block seems to work but doesn't really do what one might think when reading this source.
Thanks
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: no strict refs for blocks?
by choroba (Cardinal) on Nov 02, 2011 at 11:17 UTC | |
by Sewi (Friar) on Nov 02, 2011 at 11:44 UTC | |
by bart (Canon) on Nov 02, 2011 at 11:48 UTC | |
by jethro (Monsignor) on Nov 02, 2011 at 12:57 UTC | |
by Anonymous Monk on Nov 04, 2011 at 12:51 UTC | |
Re: no strict refs for blocks?
by ikegami (Patriarch) on Nov 02, 2011 at 19:26 UTC | |
by Anonymous Monk on Nov 02, 2011 at 22:44 UTC | |
by ikegami (Patriarch) on Nov 03, 2011 at 01:22 UTC | |
Re: no strict refs for blocks?
by moritz (Cardinal) on Nov 02, 2011 at 11:13 UTC |
Back to
Seekers of Perl Wisdom