Hi, Thanks for using Dancer.
The features explained in the article are only available in the development version of Dancer ( available here : http://search.cpan.org/~xsawyerx/Dancer-1.3089_01/ ). The current stable version contains an old version of Dancer exceptions. Sawyer, when is the next stable version planned ? dams On 12 December 2011 17:56, Angel Arancibia <[email protected]> wrote: > 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 > > _______________________________________________ > Dancer-users mailing list > [email protected] > http://www.backup-manager.org/cgi-bin/listinfo/dancer-users > _______________________________________________ Dancer-users mailing list [email protected] http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
