From: Rafael Kitover Date: Sat, 3 Oct 2009 19:46:56 +0000 (+0000) Subject: remove _pretty_print X-Git-Tag: v0.08113~32^2^2~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class.git;a=commitdiff_plain;h=6862815907d42aa2f5fcc70afd4ff2dbc9b48f79 remove _pretty_print --- diff --git a/Makefile.PL b/Makefile.PL index b76b7c9..3d1462b 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -45,6 +45,7 @@ requires 'Scope::Guard' => '0.03'; requires 'SQL::Abstract' => '1.60'; requires 'SQL::Abstract::Limit' => '0.13'; requires 'Sub::Name' => '0.04'; +requires 'Data::Dumper::Concise' => '1.000'; my %replication_requires = ( 'Moose', => '0.87', diff --git a/lib/DBIx/Class.pm b/lib/DBIx/Class.pm index 530bac2..3c36722 100644 --- a/lib/DBIx/Class.pm +++ b/lib/DBIx/Class.pm @@ -43,19 +43,6 @@ sub _attr_cache { return $@ ? $cache : { %$cache, %$rest }; } -# Pretty printer for debug messages -sub _pretty_print { - - require Data::Dumper; - local $Data::Dumper::Terse = 1; - local $Data::Dumper::Indent = 1; - local $Data::Dumper::Useqq = 1; - local $Data::Dumper::Quotekeys = 0; - local $Data::Dumper::Sortkeys = 1; - - return Data::Dumper::Dumper ($_[1]); -} - 1; =head1 NAME diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index 2548148..699f2d6 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -13,6 +13,7 @@ use DBIx::Class::Storage::DBI::Cursor; use DBIx::Class::Storage::Statistics; use Scalar::Util(); use List::Util(); +use Data::Dumper::Concise(); # what version of sqlt do we require if deploy() without a ddl_dir is invoked # when changing also adjust the corresponding author_require in Makefile.PL @@ -1438,7 +1439,7 @@ sub _execute_array { $self->throw_exception(sprintf "%s for populate slice:\n%s", ($tuple_status->[$i][1] || $err), - $self->_pretty_print ({ + Data::Dumper::Concise::Dumper({ map { $cols->[$_] => $data->[$i][$_] } (0 .. $#$cols) }), ); diff --git a/lib/DBIx/Class/Storage/DBI/Sybase.pm b/lib/DBIx/Class/Storage/DBI/Sybase.pm index 3e10e7d..eeb4f01 100644 --- a/lib/DBIx/Class/Storage/DBI/Sybase.pm +++ b/lib/DBIx/Class/Storage/DBI/Sybase.pm @@ -9,8 +9,9 @@ use base qw/ /; use mro 'c3'; use Carp::Clan qw/^DBIx::Class/; -use List::Util (); -use Sub::Name (); +use List::Util(); +use Sub::Name(); +use Data::Dumper::Concise(); __PACKAGE__->mk_group_accessors('simple' => qw/_identity _blob_log_on_update _writer_storage _is_extra_storage @@ -779,7 +780,7 @@ sub _insert_blobs { $self->throw_exception( "Could not find row in table '$table' for blob update:\n" - . $self->_pretty_print (\%where) + . Data::Dumper::Concise::Dumper (\%where) ); }