sub wrapper::AUTOLOAD { # See http://www.perlmonks.org/index.pl?node_id=265697 # "Class::Delegation is incompatible with exceptions?" for # discussion of this function and why it is needed to get C::D # to support exceptions properly. if ($@ and not $@ =~ m{ Class\WDelegation\.pm\s+line\s+\d+.$ }xm) { die $@; } Carp::confess( "Could not delegate " . $AUTOLOAD ); }