in reply to DBI Row Limiting
You can override fetchall_arrayref method.
Just create dbilimit.pl
and require it after use DBI; lineuse strict; package DBI; my $fetchall_arrayref; our $ROWS_LIMIT; INIT { $ROWS_LIMIT = 10; $fetchall_arrayref = \&fetchall_arrayref; } no warnings; sub fetchall_arrayref { my ($sth, $slice, $max_rows) = @_; $max_rows = $ROWS_LIMIT unless defined $max_rows; $fetchall_arrayref->($sth, $slice, $max_rows); } 1;
P.S. the code is not tested so it may have some bugs
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DBI Row Limiting
by ketema (Scribe) on Sep 14, 2004 at 18:29 UTC |