[Catalyst-commits] r10829 - trunk/misc/exception_test_case_simplest/lib

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Wed Jul 8 15:32:29 GMT 2009


Author: t0m
Date: 2009-07-08 15:32:28 +0000 (Wed, 08 Jul 2009)
New Revision: 10829

Modified:
   trunk/misc/exception_test_case_simplest/lib/TestAppClassException.pm
Log:
Remove more uneeded code

Modified: trunk/misc/exception_test_case_simplest/lib/TestAppClassException.pm
===================================================================
--- trunk/misc/exception_test_case_simplest/lib/TestAppClassException.pm	2009-07-08 15:09:13 UTC (rev 10828)
+++ trunk/misc/exception_test_case_simplest/lib/TestAppClassException.pm	2009-07-08 15:32:28 UTC (rev 10829)
@@ -1,89 +1,29 @@
-package TestAppClassException::Exceptions;
-
 use strict;
 use warnings;
 
 BEGIN {
     $Catalyst::Exception::CATALYST_EXCEPTION_CLASS = 'TestAppClassException::Exception';
+}
 
-    my %classes = (
-        'TestAppClassException::Exception' => {
-            description => 'Generic exception',
-            alias       => 'throw'
-        },
-    );
+{
+    package TestAppClassException::Exception;
 
-    my @exports = grep { defined } map { $classes{ $_ }->{ alias } } keys %classes;
+    use strict;
+    use warnings;
 
-    require Exception::Class;
-    require Sub::Exporter;
-
-    Exception::Class->import(%classes);
-    Sub::Exporter->import( -setup => { exports => \@exports  } );
+    sub throw {}
 }
+{
+    package TestAppClassException;
 
-package TestAppClassException::Exception;
+    use strict;
+    use warnings;
 
-## thank to Brian
-## http://bricas.vox.com/library/post/catalyst-exceptionclass.html
+    use Catalyst::Runtime '5.80';
 
-use strict;
-use warnings;
-no warnings 'redefine';
+    use Catalyst;
 
-use HTTP::Headers ();
-use HTTP::Status  ();
-use Scalar::Util  qw( blessed );
-
-sub status {
-    return $_[0]->{status} ||= 500;
+    __PACKAGE__->setup;
 }
 
-#########
-
-package TestAppClassException;
-
-use strict;
-use warnings;
-
-
-#use TestAppClassException::Exceptions;
-
-use Scalar::Util ();
-use Catalyst::Runtime '5.80';
-
-use Catalyst qw/ -Debug /;
-
-our $VERSION = '0.02';
-
-# Start the application
-__PACKAGE__->setup;
-
-=head1 NAME
-
-TestAppClassException - Catalyst based application
-
-=head1 SYNOPSIS
-
-    script/TestAppClassException_server.pl
-
-=head1 DESCRIPTION
-
-[enter your description here]
-
-=head1 SEE ALSO
-
-L<TestAppClassException::Controller::Root>, L<Catalyst>
-
-=head1 AUTHOR
-
-Ferruccio Zamuner
-
-=head1 LICENSE
-
-This library is free software, you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
-
 1;




More information about the Catalyst-commits mailing list