diff --git a/t/lib/StringifyingException.pm b/t/lib/StringifyingException.pm index aaf6e6d..1e25d22 100644 --- a/t/lib/StringifyingException.pm +++ b/t/lib/StringifyingException.pm @@ -3,9 +3,14 @@ use Kelp::Base; attr data => undef; -use overload q{""} => sub { +use overload + q{""} => 'stringify', + fallback => 1, +; + +sub stringify { return 'Exception with data: [' . (join ',', @{$_[0]->data}) . ']'; -}; +} 1;