Skip Menu |

This queue is for tickets about the Error CPAN distribution.

Report information
The Basics
Id: 17841
Status: resolved
Worked: 2 hours (120 min)
Priority: 0/
Queue: Error

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.15
Fixed in: (no value)



Subject: Error::Simple is not usable in base.pm
Error::Simple is pretty much exactly what I want as a base class for my exceptions, except that Error::Simple is defined in the main error package, and not in it's own module file. This means that the following won't work use base 'Error::Simple'; You have to instead load Error first as an additional step before you can inherit from it. use Error (); use base 'Error::Simple'; Please consider breaking the Error::Simple out into a seperate file (which you can still load at the same time as Error.pm) so that it is possible to inherit from Error::Simple directly.
From: Shlomi Fish
On Thu Feb 23 23:10:07 2006, guest wrote: Show quoted text
> Error::Simple is pretty much exactly what I want as a base class for
my Show quoted text
> exceptions, except that Error::Simple is defined in the main error > package, and not in it's own module file. > > This means that the following won't work > > use base 'Error::Simple'; > > You have to instead load Error first as an additional step before
you Show quoted text
> can inherit from it. > > use Error (); > use base 'Error::Simple'; > > Please consider breaking the Error::Simple out into a seperate file > (which you can still load at the same time as Error.pm) so that it
is Show quoted text
> possible to inherit from Error::Simple directly.
This was fixed in my own maintenance branch of Error.pm that can be found here: svn://svn.berlios.de/web-cpan/Error.pm/trunk/ The fix was simply to add an Error/Simple.pm module that "use"'s Error. Regards, Shlomi Fish