X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema.pm;h=3bf644ac51c0ddd81decd463530c5f942c7af1d8;hb=69e99ee63239ebcdd53f4aaa05c5cea5a54ed624;hp=6fca48e5431d8bda0ef73ec5245e9d5300a66a34;hpb=4b8a53eabdb1629bacdb95f04ca8fc3718ca7c58;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Schema.pm b/lib/DBIx/Class/Schema.pm index 6fca48e..3bf644a 100644 --- a/lib/DBIx/Class/Schema.pm +++ b/lib/DBIx/Class/Schema.pm @@ -3,7 +3,6 @@ package DBIx::Class::Schema; use strict; use warnings; -use DBIx::Class::Exception; use DBIx::Class::Carp; use Try::Tiny; use Scalar::Util qw/weaken blessed/; @@ -1058,7 +1057,6 @@ default behavior will provide a detailed stack trace. =cut -my $false_exception_action_warned; sub throw_exception { my $self = shift; @@ -1071,13 +1069,12 @@ sub throw_exception { ." (original error: $_[0])" ); } - elsif(! $false_exception_action_warned++) { - carp ( - "The exception_action handler installed on $self returned false instead" - .' of throwing an exception. This behavior has been deprecated, adjust your' - .' handler to always rethrow the supplied error.' - ); - } + + carp_unique ( + "The exception_action handler installed on $self returned false instead" + .' of throwing an exception. This behavior has been deprecated, adjust your' + .' handler to always rethrow the supplied error.' + ); } DBIx::Class::Exception->throw($_[0], $self->stacktrace);