12 Dec
2011
12 Dec
'11
4:56 p.m.
Hi, i'm following http://advent.perldancer.org/2011/6 but i'm a bit confussed, Dancer::Exceptions didn't have "register_exception" neither "does" defined. Also, the documentation at CPAN says "exceptions have no method to call on" I'm using Dancer 1.3080 and I would like to do something like this: register_custom_exception('Test', message_pattern => "Test message: %s" ); ----- use Test::More import => ['!pass'], tests => 1; use Dancer::Exception qw(:all); try { raise Test => "Error!"; } catch { my ($exception) = @_; ok($exception->does('Test'),"Exception"); }; Thanks in advance Angel