summaryrefslogtreecommitdiff
path: root/t/exceptions/overload.t
blob: 8d01e35be6d333145254edabe22a14a68c9759a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use strict;
use warnings;

use Test::More;
use Moose::Exception;

my $exception = Moose::Exception->new(message => 'barf!');

like($exception, qr/barf/, 'stringification for regex works');

ok($exception ne 'oh hai', 'direct string comparison works');

ok($exception, 'exception can be treated as a boolean');

done_testing;