X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FReplicated.pm;h=7857f0861ba0c39385d46c51df6376a8c5280f9d;hb=e56b1c2d9508b46a185b404413a85cd738e187a5;hp=9fa00f2d59ac9d1a79689fd4b8a2a2358a12cba0;hpb=e366f8071f0797f739114539858e59bd3aea3baa;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/Replicated.pm b/lib/DBIx/Class/Storage/DBI/Replicated.pm index 9fa00f2..7857f08 100644 --- a/lib/DBIx/Class/Storage/DBI/Replicated.pm +++ b/lib/DBIx/Class/Storage/DBI/Replicated.pm @@ -355,7 +355,6 @@ has 'write_handler' => ( _resolve_column_info _prune_unused_joins _strip_cond_qualifiers - _extract_order_columns _resolve_aliastypes_from_select_args _execute _do_query @@ -379,6 +378,9 @@ my @unimplemented = qw( _inner_join_to_node _group_over_selection _prefetch_autovalues + _extract_order_criteria + _max_column_bytesize + _is_lob_type ); # the capability framework @@ -408,8 +410,6 @@ C, C, C and C. around connect_info => sub { my ($next, $self, $info, @extra) = @_; - my $wantarray = wantarray; - my $merge = Hash::Merge->new('LEFT_PRECEDENT'); my %opts; @@ -446,11 +446,11 @@ around connect_info => sub { $self->_master_connect_info_opts(\%opts); - my (@res, $res); - if ($wantarray) { + my @res; + if (wantarray) { @res = $self->$next($info, @extra); } else { - $res = $self->$next($info, @extra); + $res[0] = $self->$next($info, @extra); } # Make sure master is blessed into the correct class and apply role to it. @@ -463,7 +463,7 @@ around connect_info => sub { # link pool back to master $self->pool->master($master); - $wantarray ? @res : $res; + wantarray ? @res : $res[0]; }; =head1 METHODS @@ -678,7 +678,7 @@ sub execute_reliably { $self->read_handler($current); }; - return $want_array ? @result : $result[0]; + return wantarray ? @result : $result[0]; } =head2 set_reliable_storage