[Bast-commits] r3494 - branches/DBIx-Class-current/lib/DBIx/Class

blblack at dev.catalyst.perl.org blblack at dev.catalyst.perl.org
Tue Jun 12 23:42:12 GMT 2007


Author: blblack
Date: 2007-06-12 23:42:11 +0100 (Tue, 12 Jun 2007)
New Revision: 3494

Modified:
   branches/DBIx-Class-current/lib/DBIx/Class/Schema.pm
Log:
default stacktrace on if $ENV{DBIC_TRACE} is on

Modified: branches/DBIx-Class-current/lib/DBIx/Class/Schema.pm
===================================================================
--- branches/DBIx-Class-current/lib/DBIx/Class/Schema.pm	2007-06-12 07:50:34 UTC (rev 3493)
+++ branches/DBIx-Class-current/lib/DBIx/Class/Schema.pm	2007-06-12 22:42:11 UTC (rev 3494)
@@ -16,7 +16,7 @@
 __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 @@
 =back
 
 Whether L</throw_exception> 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 @@
 
 Throws an exception. Defaults to using L<Carp::Clan> to report errors from
 user's perspective.  See L</exception_action> for details on overriding
-this method's behavior.  If L</stacktrace> is turned on, C<throw_exception>
-will provide a detailed stack trace.
+this method's behavior.  If L</stacktrace> is turned on, C<throw_exception>'s
+default behavior will provide a detailed stack trace.
 
 =cut
 




More information about the Bast-commits mailing list