Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

statico (5018)

statico
  ian.langworthNO@SPAMgmail.com
http://langworth.com/
AOL IM: eisforian (Add Buddy, Send Message)

PAUSE-ID: IAN [cpan.org]

Co-author of Perl Testing: A Developer's Notebook [oreilly.com]

Journal of statico (5018)

Saturday December 25, 2004
09:47 PM

exceptions and Error, commercials

[ #22456 ]

I poked with the Error module today and played with exceptions. It's pretty neat, and I think I'd like to incorperate it into future projects to use instead of using eval and checking $@ directly. It seems to be a much more readable and functional alternative, plus I'm sure there are concepts I'm not picking up (probably from my little experience with Java). I haven't completely wrapped my head wround except yet, but I'm getting there.

Commercials that need to go:

  • Both brands advertising memories with children when baking stupid cookies

Commercials that have made me laugh:

  • the AOL virus ads, "I'd like my computer to fry like a mozzerella stick"
  • the FedEx ad, "Fee-nicks? A-hahahahaha..."
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Just beware of the interface to Error.pm. It uses perl's prototype system to create anonymous subroutines. The problem is that since you don't really see an anonymous subroutine you often end up making a closure without knowing it, and then bad things can happen.

    I discuss this a little bit in my talk on exceptions [axkit.org].

    Some day I must get around to finishing Error::Filter which uses a source filter to get it right.
    • Interesting... I certainly understand your point about closures and could see how the use of Error would let you hose things unwittingly. Thanks for pointing this out :)
      --
      qw(Ian Langworth)