Revision history for DBIx::Class
+ - rename DBIX_CLASS_STORAGE_DBI_DEBUG to DBIC_TRACE
- rename _parent_rs to _parent_source in ResultSet
0.06999_05 2006-07-04 14:40:01
=head2 Tracing SQL
-The C<DBIX_CLASS_STORAGE_DBI_DEBUG> environment variable controls
+The C<DBIC_TRACE> environment variable controls
SQL tracing, so to see what is happening try
- export DBIX_CLASS_STORAGE_DBI_DEBUG=1
+ export DBIC_TRACE=1
Alternatively use the C<< storage->debug >> class method:-
Alternatively you can do this with the environment variable too:-
- export DBIX_CLASS_STORAGE_DBI_DEBUG="1=/tmp/trace.out"
+ export DBIC_TRACE="1=/tmp/trace.out"
=head2 Can't locate method result_source_instance
$new->debugobj(new DBIx::Class::Storage::Statistics());
my $fh;
- if (defined($ENV{DBIX_CLASS_STORAGE_DBI_DEBUG}) &&
- ($ENV{DBIX_CLASS_STORAGE_DBI_DEBUG} =~ /=(.+)$/)) {
+
+ my $debug_env = $ENV{DBIX_CLASS_STORAGE_DBI_DEBUG}
+ || $ENV{DBIC_TRACE};
+
+ if (defined($debug_env) && ($debug_env =~ /=(.+)$/)) {
$fh = IO::File->new($1, 'w')
or $new->throw_exception("Cannot open trace file $1");
} else {
$fh = IO::File->new('>&STDERR');
}
$new->debugfh($fh);
- $new->debug(1) if $ENV{DBIX_CLASS_STORAGE_DBI_DEBUG};
+ $new->debug(1) if $debug_env;
return $new;
}
Set or retrieve the filehandle used for trace/debug output. This should be
an IO::Handle compatible ojbect (only the C<print> method is used. Initially
set to be STDERR - although see information on the
-L<DBIX_CLASS_STORAGE_DBI_DEBUG> environment variable.
+L<DBIC_TRACE> environment variable.
=cut
=head1 ENVIRONMENT VARIABLES
-=head2 DBIX_CLASS_STORAGE_DBI_DEBUG
+=head2 DBIC_TRACE
-If C<DBIX_CLASS_STORAGE_DBI_DEBUG> is set then SQL trace information
+If C<DBIC_TRACE> is set then SQL trace information
is produced (as when the L<debug> method is set).
If the value is of the form C<1=/path/name> then the trace output is
to this environment variable will not take effect unless you also
re-connect on your schema.
+=head2 DBIX_CLASS_STORAGE_DBI_DEBUG
+
+Old name for DBIC_TRACE
+
=head1 AUTHORS
Matt S. Trout <mst@shadowcatsystems.co.uk>
Sets or retrieves the filehandle used for trace/debug output. This should
be an IO::Handle compatible object (only the C<print> method is used). Initially
should be set to STDERR - although see information on the
-L<DBIX_CLASS_STORAGE_DBI_DEBUG> environment variable.
+L<DBIC_TRACE> environment variable.
=head2 txn_begin