http://qs321.pair.com?node_id=828504


in reply to Re: Do you use an exception class in your Perl programs? Why or why not?
in thread Do you use an exception class in your Perl programs? Why or why not?

I've been mostly underwhelmed with exception based techniques and exception objects. Try::Tiny has resolved many of my complaints with exceptions in general, so I am using them again.

It bothers me to have to keep writing the likes of:

if( $@ =~ /some error stuff/ ) { warn "error stuff occurred"; } else { warn "some other message" ; }

An exception class system that works would remove the need for parsing data out of strings that should be available in a data structure.

I feel like Perl exceptions are kind of like Perl OO in general. The language provides a bare minimum set of features that can be used to get things done, bat can also be extended in clever ways.

We have 37 million Class::Foo modules that tried to build a better Perl object system. After years of experimentation, Moose hit the scene and has taken over.

Is exception handling in Perl ripe for the introduction of a revolutionary module like Moose? What would it look like?

Thanks for your thoughts.


TGI says moo