Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: perl calls die() as a method

by kappa (Chaplain)
on Aug 18, 2005 at 15:11 UTC ( [id://484810]=note: print w/replies, xml ) Need Help??


in reply to Re: perl calls die() as a method
in thread perl calls die() as a method

In actual code there's a new() and other methods too. I simplified it before posting here. And I started to Deparse when noticed wrong behaviour. Anyway, looks like chibiryuu is right and it is 5.6.2 bug. In my 5.8.7 both B::Deparse and actual test-suite show that everything is right.

Now to your remark. I override CORE::GLOBAL::die to FIX exceptions not break. My real die looks like this:

sub die (@) { unless (ref $_[0]) { CORE::die My::Error->UnCaught(text => join('', @_)); } CORE::die $_[0]; }
Now, all plain string die-s magically start to raise blessed objects (with a stringify op not to break something).
--kap

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-18 22:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found