Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^6: Question regarding handling exceptions in subroutine

by karlgoethebier (Prior)
on May 13, 2013 at 12:31 UTC ( #1033284=note: print w/replies, xml ) Need Help??


in reply to Re^5: Question regarding handling exceptions in subroutine
in thread Question regarding handling exceptions in subroutine

"Why 'eval' this..."

Good question. Because:

  1. I'm paranoid
  2. I didn't think
  3. I was in a hurry

Perhaps all items match ;-)

My posts aren't correct: it would only make (some) sense to eval if there is a die in the block that sets $@ (perhaps something wrong with $command, like a non-existing file etc). But this could be also trapped before with a file test operator...a.s.o

I just wanted to say that you forgot to right shift, as you already noticed. That would have been enough. Sorry :-(

Update:

To tell the truth: from time to time i need to take a look again at Perl documentation about this issues. I think it can be tricky - depending on the situation. And even if it isn't really tricky, i get a little confused about it from time to time...

Best regards, Karl

«The Crux of the Biscuit is the Apostrophe»

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1033284]
help
Chatterbox?
[Corion]: Hi James!
[james28909]: I looked through the docs, and see that PerlApp::exe() is suppose to return this information but whenever i try to use this, i get the error "Undefined subroutine &PerlApp::exe called"
[james28909]: i just want to verify the integrity of the executables name each time it is run.
[Corion]: Weird. this documentation says what you say.
[Corion]: I assume you are experiencing this with your packaged program. Maybe also include PerlApp.pm in the packaging list?
[james28909]: has anyone else run into this problem? i have tried searching but have not returned many results
[james28909]: ah, good idea.
[Corion]: What does print $PerlApp::VERSION output?

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (13)
As of 2017-07-28 13:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (429 votes). Check out past polls.