exceptions and Error, commercials

statico on 2004-12-26T02:47:25

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..."


Error.pm's "interface"

Matts on 2004-12-26T10:58:18

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.

Some day I must get around to finishing Error::Filter which uses a source filter to get it right.

Re:Error.pm's "interface"

statico on 2004-12-26T22:27:23

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 :)