[Bast-commits] r6173 - in DBIx-Class/0.08/trunk/lib: DBIx/Class
DBIx/Class/CDBICompat DBIx/Class/Schema DBIx/Class/Storage
DBIx/Class/Storage/DBI SQL/Translator/Parser/DBIx
SQL/Translator/Producer/DBIx/Class
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Fri May 8 08:13:31 GMT 2009
Author: ribasushi
Date: 2009-05-08 08:13:30 +0000 (Fri, 08 May 2009)
New Revision: 6173
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/CDBICompat/LiveObjectIndex.pm
DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSource.pm
DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm
DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema/Versioned.pm
DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm
DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Cursor.pm
DBIx-Class/0.08/trunk/lib/SQL/Translator/Parser/DBIx/Class.pm
DBIx-Class/0.08/trunk/lib/SQL/Translator/Producer/DBIx/Class/File.pm
Log:
Throw away some debugging code
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/CDBICompat/LiveObjectIndex.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/CDBICompat/LiveObjectIndex.pm 2009-05-07 19:15:44 UTC (rev 6172)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/CDBICompat/LiveObjectIndex.pm 2009-05-08 08:13:30 UTC (rev 6173)
@@ -51,15 +51,15 @@
sub insert {
my ($self, @rest) = @_;
$self->next::method(@rest);
-
+
return $self if $self->nocache;
- # Because the insert will die() if it can't insert into the db (or should)
- # we can be sure the object *was* inserted if we got this far. In which
- # case, given primary keys are unique and ID only returns a
- # value if the object has all its primary keys, we can be sure there
- # isn't a real one in the object index already because such a record
- # cannot have existed without the insert failing.
+ # Because the insert will die() if it can't insert into the db (or should)
+ # we can be sure the object *was* inserted if we got this far. In which
+ # case, given primary keys are unique and ID only returns a
+ # value if the object has all its primary keys, we can be sure there
+ # isn't a real one in the object index already because such a record
+ # cannot have existed without the insert failing.
if (my $key = $self->ID) {
my $live = $self->live_object_index;
weaken($live->{$key} = $self);
@@ -67,7 +67,7 @@
if ++$self->live_object_init_count->{count}
% $self->purge_object_index_every == 0;
}
- #use Data::Dumper; warn Dumper($self);
+
return $self;
}
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm 2009-05-07 19:15:44 UTC (rev 6172)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm 2009-05-08 08:13:30 UTC (rev 6173)
@@ -796,19 +796,16 @@
if (ref $query eq 'ARRAY') {
foreach my $subquery (@$query) {
next unless ref $subquery; # -or
-# warn "ARRAY: " . Dumper $subquery;
$collapsed = $self->_collapse_query($subquery, $collapsed);
}
}
elsif (ref $query eq 'HASH') {
if (keys %$query and (keys %$query)[0] eq '-and') {
foreach my $subquery (@{$query->{-and}}) {
-# warn "HASH: " . Dumper $subquery;
$collapsed = $self->_collapse_query($subquery, $collapsed);
}
}
else {
-# warn "LEAF: " . Dumper $query;
foreach my $col (keys %$query) {
my $value = $query->{$col};
$collapsed->{$col}{$value}++;
@@ -1760,19 +1757,16 @@
if (ref $cond eq 'ARRAY') {
foreach my $subcond (@$cond) {
next unless ref $subcond; # -or
-# warn "ARRAY: " . Dumper $subcond;
$collapsed = $self->_collapse_cond($subcond, $collapsed);
}
}
elsif (ref $cond eq 'HASH') {
if (keys %$cond and (keys %$cond)[0] eq '-and') {
foreach my $subcond (@{$cond->{-and}}) {
-# warn "HASH: " . Dumper $subcond;
$collapsed = $self->_collapse_cond($subcond, $collapsed);
}
}
else {
-# warn "LEAF: " . Dumper $cond;
foreach my $col (keys %$cond) {
my $value = $cond->{$col};
$collapsed->{$col} = $value;
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSource.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSource.pm 2009-05-07 19:15:44 UTC (rev 6172)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSource.pm 2009-05-08 08:13:30 UTC (rev 6173)
@@ -1110,7 +1110,6 @@
$self->throw_exception("No idea how to resolve join reftype ".ref $join);
} else {
my $count = ++$seen->{$join};
- #use Data::Dumper; warn Dumper($seen);
my $as = ($count > 1 ? "${join}_${count}" : $join);
my $rel_info = $self->relationship_info($join);
$self->throw_exception("No such relationship ${join}") unless $rel_info;
@@ -1287,8 +1286,6 @@
sub resolve_prefetch {
my ($self, $pre, $alias, $seen, $order, $collapse) = @_;
$seen ||= {};
- #$alias ||= $self->name;
- #warn $alias, Dumper $pre;
if( ref $pre eq 'ARRAY' ) {
return
map { $self->resolve_prefetch( $_, $alias, $seen, $order, $collapse ) }
@@ -1301,7 +1298,6 @@
$self->related_source($_)->resolve_prefetch(
$pre->{$_}, "${alias}.$_", $seen, $order, $collapse)
} keys %$pre;
- #die Dumper \@ret;
return @ret;
}
elsif( ref $pre ) {
@@ -1354,8 +1350,6 @@
return map { [ "${as}.$_", "${as_prefix}${pre}.$_", ] }
$rel_source->columns;
- #warn $alias, Dumper (\@ret);
- #return @ret;
}
}
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm 2009-05-07 19:15:44 UTC (rev 6172)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm 2009-05-08 08:13:30 UTC (rev 6173)
@@ -347,7 +347,6 @@
$self->throw_exception( "Can't get last insert id" )
unless (@ids == @auto_pri);
$self->store_column($auto_pri[$_] => $ids[$_]) for 0 .. $#ids;
-#use Data::Dumper; warn Dumper($self);
}
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema/Versioned.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema/Versioned.pm 2009-05-07 19:15:44 UTC (rev 6172)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema/Versioned.pm 2009-05-08 08:13:30 UTC (rev 6173)
@@ -182,7 +182,6 @@
use warnings;
use base 'DBIx::Class';
use POSIX 'strftime';
-use Data::Dumper;
__PACKAGE__->mk_classdata('_filedata');
__PACKAGE__->mk_classdata('upgrade_directory');
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Cursor.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Cursor.pm 2009-05-07 19:15:44 UTC (rev 6172)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Cursor.pm 2009-05-08 08:13:30 UTC (rev 6173)
@@ -36,8 +36,8 @@
sub new {
my ($class, $storage, $args, $attrs) = @_;
- #use Data::Dumper; warn Dumper(@_);
$class = ref $class if ref $class;
+
my $new = {
storage => $storage,
args => $args,
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm 2009-05-07 19:15:44 UTC (rev 6172)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm 2009-05-08 08:13:30 UTC (rev 6173)
@@ -62,8 +62,6 @@
sub _strip_outer_paren {
my ($self, $arg) = @_;
-use Data::Dumper;
-
return $self->_SWITCH_refkind ($arg, {
ARRAYREFREF => sub {
$$arg->[0] = __strip_outer_paren ($$arg->[0]);
@@ -1375,14 +1373,8 @@
# @bind = map { ref $_ ? ''.$_ : $_ } @bind; # stringify args
## This must be an arrayref, else nothing works!
-
my $tuple_status = [];
-
- ##use Data::Dumper;
- ##print STDERR Dumper( $data, $sql, [@bind] );
- my $time = time();
-
## Get the bind_attributes, if any exist
my $bind_attributes = $self->source_bind_attributes($source);
Modified: DBIx-Class/0.08/trunk/lib/SQL/Translator/Parser/DBIx/Class.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/SQL/Translator/Parser/DBIx/Class.pm 2009-05-07 19:15:44 UTC (rev 6172)
+++ DBIx-Class/0.08/trunk/lib/SQL/Translator/Parser/DBIx/Class.pm 2009-05-08 08:13:30 UTC (rev 6173)
@@ -13,7 +13,6 @@
$DEBUG = 0 unless defined $DEBUG;
use Exporter;
-use Data::Dumper;
use SQL::Translator::Utils qw(debug normalize_name);
use base qw(Exporter);
Modified: DBIx-Class/0.08/trunk/lib/SQL/Translator/Producer/DBIx/Class/File.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/SQL/Translator/Producer/DBIx/Class/File.pm 2009-05-07 19:15:44 UTC (rev 6172)
+++ DBIx-Class/0.08/trunk/lib/SQL/Translator/Producer/DBIx/Class/File.pm 2009-05-08 08:13:30 UTC (rev 6173)
@@ -25,6 +25,7 @@
use SQL::Translator::Schema::Constants;
use SQL::Translator::Utils qw(header_comment);
+use Data::Dumper ();
## Skip all column type translation, as we want to use whatever the parser got.
More information about the Bast-commits
mailing list