X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fprefetch%2Fo2m_o2m_order_by_with_limit.t;h=5f0fffb7c2b6172991f14c58ab0816949ff7fe22;hb=58b92e31bbd259ddf1d32e342d3978cd43d6e1af;hp=75dda03387e028a70988a204dcb8abf147316c6c;hpb=eb58c082cf9c35760d8fc199483d38c1d926b2e4;p=dbsrgits%2FDBIx-Class.git diff --git a/t/prefetch/o2m_o2m_order_by_with_limit.t b/t/prefetch/o2m_o2m_order_by_with_limit.t index 75dda03..5f0fffb 100644 --- a/t/prefetch/o2m_o2m_order_by_with_limit.t +++ b/t/prefetch/o2m_o2m_order_by_with_limit.t @@ -1,11 +1,12 @@ +BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) } + use strict; use warnings; use Test::More; +use List::Util 'min'; -use lib qw(t/lib); -use DBIC::SqlMakerTest; -use DBICTest; +use DBICTest ':DiffSQL'; use DBIx::Class::SQLMaker::LimitDialects; my ($ROWS, $OFFSET) = ( @@ -132,7 +133,7 @@ for ( is_deeply( $rs->all_hri, - [ @{$hri_contents}[$offset .. List::Util::min( $used_limit+$offset-1, $#$hri_contents)] ], + [ @{$hri_contents}[$offset .. min( $used_limit+$offset-1, $#$hri_contents)] ], "Correct slice of the resultset returned with limit '$limit', offset '$offset'", ); }