X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FException.pm;h=a5e9945ec8f885d4ed3b45c5de792511c1a570ea;hb=c5340bfac7aff784999be6ab4fa803fd9440043f;hp=3c2aa9b0d3d60dfd6885832a106a109f3cbdf05f;hpb=70c288086248e5a4008490df22a56632341f2473;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Exception.pm b/lib/DBIx/Class/Exception.pm index 3c2aa9b..a5e9945 100644 --- a/lib/DBIx/Class/Exception.pm +++ b/lib/DBIx/Class/Exception.pm @@ -3,6 +3,11 @@ package DBIx::Class::Exception; use strict; use warnings; +# 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 @@ -35,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) } @@ -56,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', ); @@ -83,13 +88,16 @@ sub rethrow { die shift; } -=head1 AUTHORS +=head1 FURTHER QUESTIONS? -Brandon L. Black +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