in reply to Advice on a Base and Exception Class

Do you need an exception class? Are you planning on throwing exceptions everywhere and wrapping everything in an eval-block? I, personally, find exceptions rather annoying. If I have an abnormal termination, croak is generally good enough. If I don't have an abnormal termination, then I should just be using return values.

As for a base class, why not just use one of the gazillion options on CPAN? Pick one and learn to like it. For the most part, they're all pretty similar.


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
  • Comment on Re: Advice on a Base and Exception Class

Replies are listed 'Best First'.
Re^2: Advice on a Base and Exception Class
by ghenry (Vicar) on Jan 18, 2006 at 22:07 UTC

    Update: What about Class::Base or can/should I just use any other distros Base class?

    Good point. I'll browse CPAN for a Base class.

    I wasn't planning on throwing everywhere, so it maybe makes sense to continue to use croak. I just wanted to know the convention.

    Walking the road to enlightenment... I found a penguin and a camel on the way.....
    Fancy a yourname@perl.me.uk? Just ask!!!