[Catalyst-commits] r11365 - in Catalyst-Runtime/5.80/branches/exception_interface: . lib/Catalyst/Exception t

rafl at dev.catalyst.perl.org rafl at dev.catalyst.perl.org
Tue Sep 15 19:18:00 GMT 2009


Author: rafl
Date: 2009-09-15 19:18:00 +0000 (Tue, 15 Sep 2009)
New Revision: 11365

Modified:
   Catalyst-Runtime/5.80/branches/exception_interface/Makefile.PL
   Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Exception/Basic.pm
   Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Exception/Interface.pm
   Catalyst-Runtime/5.80/branches/exception_interface/t/custom_exception_class_simple.t
Log:
Use MooseX::Role::WithOverloading.

Modified: Catalyst-Runtime/5.80/branches/exception_interface/Makefile.PL
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/Makefile.PL	2009-09-15 19:17:41 UTC (rev 11364)
+++ Catalyst-Runtime/5.80/branches/exception_interface/Makefile.PL	2009-09-15 19:18:00 UTC (rev 11365)
@@ -21,6 +21,7 @@
 requires 'Class::MOP' => '0.83';
 requires 'Moose' => '0.78';
 requires 'MooseX::MethodAttributes::Inheritable' => '0.15';
+requires 'MooseX::Role::WithOverloading';
 requires 'Carp';
 requires 'Class::C3::Adopt::NEXT' => '0.07';
 requires 'CGI::Simple::Cookie';

Modified: Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Exception/Basic.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Exception/Basic.pm	2009-09-15 19:17:41 UTC (rev 11364)
+++ Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Exception/Basic.pm	2009-09-15 19:18:00 UTC (rev 11365)
@@ -1,6 +1,6 @@
 package Catalyst::Exception::Basic;
 
-use Moose::Role;
+use MooseX::Role::WithOverloading;
 use Carp;
 use namespace::clean -except => 'meta';
 
@@ -12,10 +12,6 @@
     default => sub { $! || '' },
 );
 
-use overload
-    q{""}    => \&as_string,
-    fallback => 1;
-
 sub as_string {
     my ($self) = @_;
     return $self->message;

Modified: Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Exception/Interface.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Exception/Interface.pm	2009-09-15 19:17:41 UTC (rev 11364)
+++ Catalyst-Runtime/5.80/branches/exception_interface/lib/Catalyst/Exception/Interface.pm	2009-09-15 19:18:00 UTC (rev 11365)
@@ -1,8 +1,12 @@
 package Catalyst::Exception::Interface;
 
-use Moose::Role;
-use namespace::autoclean;
+use MooseX::Role::WithOverloading;
+use namespace::clean -except => 'meta';
 
+use overload
+    q{""}    => sub { $_[0]->as_string },
+    fallback => 1;
+
 requires qw/as_string throw rethrow/;
 
 1;

Modified: Catalyst-Runtime/5.80/branches/exception_interface/t/custom_exception_class_simple.t
===================================================================
--- Catalyst-Runtime/5.80/branches/exception_interface/t/custom_exception_class_simple.t	2009-09-15 19:17:41 UTC (rev 11364)
+++ Catalyst-Runtime/5.80/branches/exception_interface/t/custom_exception_class_simple.t	2009-09-15 19:18:00 UTC (rev 11365)
@@ -7,12 +7,6 @@
 use Test::More tests => 1;
 use Test::Exception;
 
-TODO: {
-    local $TODO = 'Does not work yet';
-
 lives_ok {
     require TestAppClassExceptionSimpleTest;
 } 'Can load application';
-
-}
-




More information about the Catalyst-commits mailing list