[Catalyst-commits] r11169 - Catalyst-Runtime/5.80/trunk/t/lib

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Wed Aug 19 20:29:16 GMT 2009


Author: t0m
Date: 2009-08-19 20:29:16 +0000 (Wed, 19 Aug 2009)
New Revision: 11169

Modified:
   Catalyst-Runtime/5.80/trunk/t/lib/TestAppClassExceptionSimpleTest.pm
Log:
Clean up test app for the exception test, as we don't want to depend on Test::Class thanks

Modified: Catalyst-Runtime/5.80/trunk/t/lib/TestAppClassExceptionSimpleTest.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/TestAppClassExceptionSimpleTest.pm	2009-08-19 20:21:44 UTC (rev 11168)
+++ Catalyst-Runtime/5.80/trunk/t/lib/TestAppClassExceptionSimpleTest.pm	2009-08-19 20:29:16 UTC (rev 11169)
@@ -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 throw {}
 
-sub status {
-    return $_[0]->{status} ||= 500;
-}
-
 #########
 
 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;
 




More information about the Catalyst-commits mailing list