| 1 | package DBIx::Class::Helper::ResultSet::Shortcut::LimitedPage; | ||||||||||||||
| 2 | 57 | $DBIx::Class::Helper::ResultSet::Shortcut::LimitedPage::VERSION = '2.037000'; | |||||||||||||
| 3 | 57 | ▶ | use strict; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 4 | 57 | ▶ | use warnings; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 5 | |||||||||||||||
| 6 | 57 | ▶ | use parent qw( | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 7 | DBIx::Class::Helper::ResultSet::Shortcut::Rows | ||||||||||||||
| 8 | DBIx::Class::Helper::ResultSet::Shortcut::Page | ||||||||||||||
| 9 | DBIx::Class::ResultSet | ||||||||||||||
| 10 | 57 | ); | |||||||||||||
| 11 | |||||||||||||||
| 12 | 5 | ▶ | sub limited_page { | ||||||||||||
|
Subroutine
limited_page: called CC=4 SCAR=13.9
Pod
undocumented
| |||||||||||||||
| 13 | 5 | my $self = shift; | |||||||||||||
| 14 | 5 | ▶ | if (@_ == 1) { | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 15 | 4 | my $arg = shift; | |||||||||||||
| 16 | 4 | ▶ | if (ref $arg) { | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 17 | 3 | my ( $page, $rows ) = @$arg{qw(page rows)}; | |||||||||||||
| 18 | 3 | return $self->page($page)->rows($rows); | |||||||||||||
| 19 | } else { | ||||||||||||||
| 20 | 1 | return $self->page($arg); | |||||||||||||
| 21 | } | ||||||||||||||
| 22 | } elsif (@_ == 2) { | ||||||||||||||
| 23 | 1 | my ( $page, $rows ) = @_; | |||||||||||||
| 24 | 1 | return $self->page($page)->rows($rows); | |||||||||||||
| 25 | } else { | ||||||||||||||
| 26 | 0 | die 'Invalid args passed to get_page method'; | |||||||||||||
| 27 | } | ||||||||||||||
| 28 | } | ||||||||||||||
| 29 | |||||||||||||||
| 30 | 57 | 1; | |||||||||||||
| 31 | |||||||||||||||
| 32 | __END__ | ||||||||||||||