From: Tomas Doran Date: Wed, 19 Aug 2009 20:29:16 +0000 (+0000) Subject: Clean up test app for the exception test, as we don't want to depend on Test::Class... X-Git-Tag: 5.80008~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=c4b74171fea46515eb13446f0233ad02d7a34c20 Clean up test app for the exception test, as we don't want to depend on Test::Class thanks --- diff --git a/t/lib/TestAppClassExceptionSimpleTest.pm b/t/lib/TestAppClassExceptionSimpleTest.pm index aec9cbc..aef61be 100644 --- a/t/lib/TestAppClassExceptionSimpleTest.pm +++ b/t/lib/TestAppClassExceptionSimpleTest.pm @@ -1,53 +1,18 @@ -package TestAppClassExceptionSimpleTest::Exceptions; - -use strict; -use warnings; - -BEGIN { - $Catalyst::Exception::CATALYST_EXCEPTION_CLASS = 'TestAppClassExceptionSimpleTest::Exception'; - - my %classes = ( - 'TestAppClassExceptionSimpleTest::Exception' => { - description => 'Generic exception', - alias => 'throw' - }, - ); - - my @exports = grep { defined } map { $classes{ $_ }->{ alias } } keys %classes; - - require Exception::Class; - require Sub::Exporter; - - Exception::Class->import(%classes); - Sub::Exporter->import( -setup => { exports => \@exports } ); -} - package TestAppClassExceptionSimpleTest::Exception; - use strict; use warnings; -no warnings 'redefine'; - -use HTTP::Headers (); -use HTTP::Status (); -use Scalar::Util qw( blessed ); -sub status { - return $_[0]->{status} ||= 500; -} +sub throw {} ######### package TestAppClassExceptionSimpleTest; - use strict; use warnings; -use Scalar::Util (); -use Catalyst::Runtime '5.80'; -use Catalyst qw/ -Debug /; +BEGIN { $Catalyst::Exception::CATALYST_EXCEPTION_CLASS = 'TestAppClassExceptionSimpleTest::Exception'; } -our $VERSION = '0.02'; +use Catalyst; __PACKAGE__->setup;