On Sat Jun 06 16:20:16 2015, DROLSKY wrote:
Show quoted text> On Wed Jun 03 04:53:20 2015, ABELTJE wrote:
> > package AnException;
> > use warnings;
> > use strict;
> >
> > use base 'Exception::Class';
> >
> > use Exception::Class (
> > 'AnException',
> > 'AnException::ToThrow' => {
> > isa => 'AnException',
> > description => 'This is warns in 5.16+',
> > },
> > );
> >
> > 1;
> > __END__
> >
> > $ perl5142 -I. -cw AnException.pm
> > AnException.pm syntax OK
> >
> > $ perl5163 -I. -cw AnException.pm
> > Subroutine description redefined at (eval 8) line 10.
> > AnException.pm syntax OK
>
> There is a small bug here, but it's only surfacing because the package
> where you "use Exception::Class" is also the name of one of your
> exception classes. I would recommend not doing that.
Fwiw, That's not it:
package AnException::Class;
use warnings;
use strict;
use base 'Exception::Class';
use Exception::Class (
'AnException',
'AnException::ToThrow' => {
isa => 'AnException',
description => 'This is warns in 5.16+',
},
);
1;
__END__
$ perl5142 -wc AnException/Class.pm
AnException/Class.pm syntax OK
$ perl5163 -wc AnException/Class.pm
Subroutine description redefined at (eval 8) line 10.
AnException/Class.pm syntax OK