in reply to Re: Error Message when I use Strict
in thread Error Message when I use Strict
There's not much danger in using symbolic references - what "use strict 'refs'" does for you is prevent you from using symbolic references accidentally (which can be a problem), but that isn't the case here. The biggest danger lies probably in mistyping the value for $SubroutName, which will lead to a run-type error. But your dispatch table suffers from that as well. The use of a symbolic reference to call a sub hardly differs from your solution - except that the dispatch table isn't coded explicitly - you're using the stash as the dispatch table.$SubroutName = 'test'; { no strict 'refs'; &$SubroutName; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Error Message when I use Strict
by Joost (Canon) on Jul 29, 2005 at 12:48 UTC | |
|
Re^3: Error Message when I use Strict
by holli (Abbot) on Jul 29, 2005 at 12:39 UTC |