use Error qw(:try);
use MyExceptionClassDescendentOfErrorSimple;
use Moose;
try {
_CallMethod();
}
catch MyExceptionClassDescendentOfErrorSimple with {
my $ex = shift;
print "ex";
}
use Error qw(:try);
use MyExceptionClassDescendentOfErrorSimple;
use Moose;
try {
_CallMethod();
}
catch MyExceptionClassDescendentOfErrorSimple with {
my $ex = shift;
print "ex";
}
I just created this runnable example, and it works just fine on my system (perl 5.8.6, Moose 0.55, Class::MOP 0.64 and Error 0.17015).
If you have a more detailed case which exhibits your issue, please submit it in a bug report on rt.cpan.org and we can take a look. It is also helpful if you can include a self-contained runnable example and the actual error you are seeing as well, without these I can only guess as to the problem you are having.
Has anyone used moose with exception another exception handling module ?Yes, it is used regularly with Exception::Class without issue, and I suspect with Error.pm too, otherwise I am sure someone would have raised the issues before now.
- Stevan
with (no pun intended):
so the "with"-methods seem to collide.