around error => sub {
my ($orig, $self) = (shift, shift);
+ # Emulate horrible Class::Base API
+ unless (ref ($self)) {
+ my $errref = do { no strict 'refs'; \${"${self}::_ERROR"} };
+ return $$errref unless @_;
+ $$errref = $_[0];
+ return undef;
+ }
+
return $self->$orig unless @_;
- $self->$orig(ref($_[0]) ? $_[0] : join('', @_));
+ $self->$orig(@_);
return undef;
};