|more useful options|
Can't call method "otherwise" without a package or object reference atby rpelak (Sexton)
|on Oct 05, 2010 at 22:54 UTC||Need Help??|
rpelak has asked for the
wisdom of the Perl Monks concerning the following question:
I am getting this error
Can't call method "otherwise" without a package or object reference at ...
Before that it was
Can't call method "with" without a package or object reference at ...
So something is funky...
I have several try catch blocks in the same sub though they are mutually exclusive mostly. The others work. I recently decided I needed to add the one that is having the issue. (stupid command I am calling inexplicably fails 1 in 10,000 times) And this new one just won't work... Here is some code...
That is the offending code. The Exec proc is here
When I first ran into the error about "with" I did some research and found that you can get that error if an exception other than the one you named gets thrown. And they suggested the addition of the otherwise clause to catch those "other" exceptions. So I dropped one in to try and basically catch all errors and convert to a warning... But now the error is about the otherwise clause. AS far as my research is convinced it can't be about the error type that is getting thrown, so it must be something else, perhaps the otherwise isn't related... Anyone have any insight?