Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: Error::Simple

by hardburn (Abbot)
on Aug 20, 2003 at 14:01 UTC ( #285200=note: print w/replies, xml ) Need Help??

in reply to use Error::Simple - can't be found in @INC

Bewarned about It has some nasty problems with closures, and I've decided to shy away from it, despite the fact that I happen to like Java-style exception handling. Personally, I go with Exception::Class, which doesn't give you the nice syntax that does, but its good enough:

use Exception::Class ('MyException'); eval { # Pretend this says 'try' MyException->throw( error => 'I feel funny.'; }; if( UNIVERSAL::isa( $@, 'MyException' ) ) { # Pretend this says 'catc +h MyException' warn $@->error, "\n, $@->trace->as_string, "\n"; warn join ' ', $@->euid, $@->egid, $@->uid, $@->gid, $@->pid, $@ +->time; exit; }

I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

Note: All code is untested, unless otherwise stated

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2020-12-02 19:23 GMT
Find Nodes?
    Voting Booth?
    How often do you use taint mode?

    Results (44 votes). Check out past polls.