Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: eval and goto: no worky?

by saintmike (Vicar)
on Nov 09, 2010 at 23:02 UTC ( #870425=note: print w/replies, xml ) Need Help??


in reply to Re: eval and goto: no worky?
in thread eval and goto: no worky?

Interesting, I didn't see a warning with warnings and strict on. Did you find that in the documentation?

Replies are listed 'Best First'.
Re^3: eval and goto: no worky?
by Anonymous Monk on Nov 09, 2010 at 23:10 UTC
    foo( "a" ); sub foo { eval { goto &foo2; } or warn $@; } sub foo2 { print "foo2 called with @_\n"; } __END__ Can't goto subroutine from an eval-block at - line 4.
Re^3: eval and goto: no worky?
by ikegami (Pope) on Nov 10, 2010 at 01:19 UTC
    It's not a warning, it's a fatal error. You successfully caught the error and subsequently ignored it. An Anonymous Monk shows how you could actually look at the error you are hiding.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://870425]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2020-05-30 06:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (171 votes). Check out past polls.

    Notices?