package My::AwesomeError; BEGIN { require Example::Error; push @Example::Error::ISA, __PACKAGE__; } sub as_string { die "as_string should be implemented by subclass"; } sub asplode { my $self = @_; die "BANG! ".$self->as_string; }