cmilfo has asked for the wisdom of the Perl Monks concerning the following question:
After evaluating the method calls, I loop through the exceptions defined by the user.<exception> <error>No such file or directory</error> <action>die</action> <message>Verify the file exists on the remote server</message> </exception>
The problem I am having is with the $exception->{action} call. In the XML above, the action was to die (don't worry, I check to make sure the user uses warn, die, croak, or carp; that is all I allow, for now). The error I receive is that I can't use the string die while strict refs are in place. Am I calling the sub routine correctly? I have exhausted my resources at work. Thank youfor my $exception (@exceptions) { if ($@ =~ /$exception->{error}/) { $exception->{action}( &LogMsg( \( "Error", "In action " . "$object_hash{name}: " . "$exception->{message}\n" ) ), "\n" ); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re: calling a sub routine from a scalar
by tye (Sage) on May 16, 2001 at 21:19 UTC | |
by cmilfo (Hermit) on May 16, 2001 at 21:54 UTC | |
by suaveant (Parson) on May 16, 2001 at 22:18 UTC | |
|
Re: calling a sub routine from a scalar
by suaveant (Parson) on May 16, 2001 at 20:39 UTC | |
by cmilfo (Hermit) on May 16, 2001 at 21:06 UTC | |
by suaveant (Parson) on May 16, 2001 at 22:04 UTC | |
|
Re: calling a sub routine from a scalar
by Hot Pastrami (Monk) on May 16, 2001 at 20:37 UTC | |
by suaveant (Parson) on May 16, 2001 at 20:48 UTC |