From: Brandon L. Black Date: Tue, 12 Jun 2007 22:42:11 +0000 (+0000) Subject: default stacktrace on if $ENV{DBIC_TRACE} is on X-Git-Tag: v0.08010~150^2~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class.git;a=commitdiff_plain;h=4b946902c9546e42cd9d73e5c8ba12767d8f7e2a default stacktrace on if $ENV{DBIC_TRACE} is on --- diff --git a/lib/DBIx/Class/Schema.pm b/lib/DBIx/Class/Schema.pm index e53d115..e7064df 100644 --- a/lib/DBIx/Class/Schema.pm +++ b/lib/DBIx/Class/Schema.pm @@ -16,7 +16,7 @@ __PACKAGE__->mk_classdata('source_registrations' => {}); __PACKAGE__->mk_classdata('storage_type' => '::DBI'); __PACKAGE__->mk_classdata('storage'); __PACKAGE__->mk_classdata('exception_action'); -__PACKAGE__->mk_classdata('stacktrace' => 0); +__PACKAGE__->mk_classdata('stacktrace' => $ENV{DBIC_TRACE} || 0); =head1 NAME @@ -896,7 +896,8 @@ Example: =back Whether L should include stack trace information. -Defaults to false. +Defaults to false normally, but defaults to true if C<$ENV{DBIC_TRACE}> +is true. =head2 throw_exception @@ -908,8 +909,8 @@ Defaults to false. Throws an exception. Defaults to using L to report errors from user's perspective. See L for details on overriding -this method's behavior. If L is turned on, C -will provide a detailed stack trace. +this method's behavior. If L is turned on, C's +default behavior will provide a detailed stack trace. =cut