in reply to Re: Re: Class::Delegation is incompatible with exceptions?
in thread Class::Delegation is incompatible with exceptions?
I think that the best thing to do would be to change the lines 96-97 from
to? eval { [$target->$as(@$args)] } : eval { $target->$as(@$args) };
I think the eval simply doesn't belong there. We know that the method does exist already thanks to the? [$target->$as(@$args)] : $target->$as(@$args);
above and if the method feels like throwing an exception I don't think the Class::Delegate should interfere. I think we should ask TheDamian why is the eval{} there.return unless eval { $target->can($as) };
Jenda
Always code as if the guy who ends up maintaining your code
will be a violent psychopath who knows where you live.
-- Rick Osborne
Edit by castaway: Closed small tag in signature
|
|---|