use Scalar::Util qw/weaken/;
use Carp::Clan qw/^DBIx::Class/;
use IO::File;
+use DBIx::Class::Storage::TxnScopeGuard;
__PACKAGE__->mk_group_accessors('simple' => qw/debug debugobj schema/);
__PACKAGE__->mk_group_accessors('inherited' => 'cursor_class');
$new->set_schema($schema);
$new->debugobj(new DBIx::Class::Storage::Statistics());
- my $fh;
+ #my $fh;
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');
- }
-
- $fh->autoflush(1);
- $new->debugfh($fh);
$new->debug(1) if $debug_env;
$new;
sub txn_rollback { die "Virtual method!" }
+=for
+
+=head2 txn_scope_guard
+
+Return an object that does stuff.
+
+=cut
+
+sub txn_scope_guard {
+ return DBIx::Class::Storage::TxnScopeGuard->new($_[0]);
+}
+
=head2 sql_maker
Returns a C<sql_maker> object - normally an object of class
Old name for DBIC_TRACE
+=head1 SEE ALSO
+
+L<DBIx::Class::Storage::DBI> - reference storage inplementation using SQL::Abstract and DBI.
+
=head1 AUTHORS
Matt S. Trout <mst@shadowcatsystems.co.uk>