X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FException.pm;h=a5e9945ec8f885d4ed3b45c5de792511c1a570ea;hb=d2308dde5718dc0f828584c3fa24d7417c484040;hp=58319d9548d196b22275480aa23622c9c220120c;hpb=5e0e5426b36b5df5f9d1394068cd9f7f1c81087a;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Exception.pm b/lib/DBIx/Class/Exception.pm index 58319d9..a5e9945 100644 --- a/lib/DBIx/Class/Exception.pm +++ b/lib/DBIx/Class/Exception.pm @@ -3,9 +3,13 @@ package DBIx::Class::Exception; use strict; use warnings; -use DBIx::Class::Carp (); +# load Carp early to prevent tickling of the ::Internal stash being +# interpreted as "Carp is already loaded" by some braindead loader +use Carp (); $Carp::Internal{ (__PACKAGE__) }++; +use DBIx::Class::Carp (); + use overload '""' => sub { shift->{msg} }, fallback => 1; @@ -36,8 +40,8 @@ overload fallback to give natural boolean/numeric values. This is meant for internal use by L's C code, and shouldn't be used directly elsewhere. -Expects a scalar exception message. The optional argument -C<$stacktrace> tells it to output a full trace similar to L. +Expects a scalar exception message. The optional boolean C<$stacktrace> +causes it to output a full trace similar to L. DBIx::Class::Exception->throw('Foo'); try { ... } catch { DBIx::Class::Exception->throw(shift) } @@ -57,7 +61,7 @@ sub throw { # skip all frames that match the original caller, or any of # the dbic-wide classdata patterns my ($ln, $calling) = DBIx::Class::Carp::__find_caller( - '^' . caller() . '$', + '^' . CORE::caller() . '$', 'DBIx::Class', ); @@ -84,13 +88,16 @@ sub rethrow { die shift; } -=head1 AUTHOR AND CONTRIBUTORS +=head1 FURTHER QUESTIONS? -See L and L in DBIx::Class +Check the list of L. -=head1 LICENSE +=head1 COPYRIGHT AND LICENSE -You may distribute this code under the same terms as Perl itself. +This module is free software L +by the L. You can +redistribute it and/or modify it under the same terms as the +L. =cut