X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FException%2FBasic.pm;h=253b6a8d89db36fc300c32bcb0d801b079e6ae74;hb=db74897ffd0975384a0be1e877b33f456de6cb15;hp=f32a6e639e4da7d7ff6734218a90a4f1dd24292e;hpb=b6c6af73c35c442dea0ed179bfc6c73c49f6fc3e;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Exception/Basic.pm b/lib/Catalyst/Exception/Basic.pm index f32a6e6..253b6a8 100644 --- a/lib/Catalyst/Exception/Basic.pm +++ b/lib/Catalyst/Exception/Basic.pm @@ -1,6 +1,8 @@ package Catalyst::Exception::Basic; -use MooseX::Role::WithOverloading; +use Moose::Role; +use if !eval { require Moose; Moose->VERSION('2.1300') }, + 'MooseX::Role::WithOverloading'; use Carp; use namespace::clean -except => 'meta'; @@ -53,11 +55,11 @@ Catalyst::Exception::Basic - Basic Catalyst Exception Role package My::Exception; use Moose; use namespace::clean -except => 'meta'; - + with 'Catalyst::Exception::Basic'; - + # Elsewhere.. - My::Exception::Basic->throw( qq/Fatal exception/ ); + My::Exception->throw( qq/Fatal exception/ ); See also L and L. @@ -76,7 +78,7 @@ Holds the exception message. =head2 as_string -Stringifies the exception's message attribute. +Stringifies the exception's message attribute. Called when the object is stringified by overloading. =head2 throw( $message )