line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DBIx::Class::Helper::ResultSet::Shortcut::LimitedPage; |
2
|
|
|
|
|
|
|
$DBIx::Class::Helper::ResultSet::Shortcut::LimitedPage::VERSION = '2.036000'; |
3
|
57
|
|
|
57
|
|
24741
|
use strict; |
|
57
|
|
|
|
|
130
|
|
|
57
|
|
|
|
|
1479
|
|
4
|
57
|
|
|
57
|
|
268
|
use warnings; |
|
57
|
|
|
|
|
467
|
|
|
57
|
|
|
|
|
1576
|
|
5
|
|
|
|
|
|
|
|
6
|
57
|
|
|
|
|
293
|
use parent qw( |
7
|
|
|
|
|
|
|
DBIx::Class::Helper::ResultSet::Shortcut::Rows |
8
|
|
|
|
|
|
|
DBIx::Class::Helper::ResultSet::Shortcut::Page |
9
|
|
|
|
|
|
|
DBIx::Class::ResultSet |
10
|
57
|
|
|
57
|
|
280
|
); |
|
57
|
|
|
|
|
125
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub limited_page { |
13
|
5
|
|
|
5
|
0
|
35224
|
my $self = shift; |
14
|
5
|
100
|
|
|
|
22
|
if (@_ == 1) { |
|
|
50
|
|
|
|
|
|
15
|
4
|
|
|
|
|
7
|
my $arg = shift; |
16
|
4
|
100
|
|
|
|
13
|
if (ref $arg) { |
17
|
3
|
|
|
|
|
11
|
my ( $page, $rows ) = @$arg{qw(page rows)}; |
18
|
3
|
|
|
|
|
11
|
return $self->page($page)->rows($rows); |
19
|
|
|
|
|
|
|
} else { |
20
|
1
|
|
|
|
|
5
|
return $self->page($arg); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
} elsif (@_ == 2) { |
23
|
1
|
|
|
|
|
3
|
my ( $page, $rows ) = @_; |
24
|
1
|
|
|
|
|
13
|
return $self->page($page)->rows($rows); |
25
|
|
|
|
|
|
|
} else { |
26
|
0
|
|
|
|
|
|
die 'Invalid args passed to get_page method'; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=pod |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 NAME |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
DBIx::Class::Helper::ResultSet::Shortcut::LimitedPage |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 AUTHOR |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com> |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
This software is copyright (c) 2020 by Arthur Axel "fREW" Schmidt. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
49
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=cut |