line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JQuery::DataTables::Heavy; |
2
|
1
|
|
|
1
|
|
882
|
use 5.008005; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
43
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
37
|
|
4
|
1
|
|
|
1
|
|
14
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
52
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = "0.04"; |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
1768
|
use Moo; |
|
1
|
|
|
|
|
11540
|
|
|
1
|
|
|
|
|
6
|
|
9
|
1
|
|
|
1
|
|
2210
|
use MooX::Types::MooseLike::Base qw(:all); |
|
1
|
|
|
|
|
4493
|
|
|
1
|
|
|
|
|
307
|
|
10
|
1
|
|
|
1
|
|
9
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
45
|
|
11
|
1
|
|
|
1
|
|
465
|
use Class::Load (); |
|
1
|
|
|
|
|
15583
|
|
|
1
|
|
|
|
|
24
|
|
12
|
1
|
|
|
1
|
|
7
|
use namespace::clean; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
3
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
has subclass => ( is => 'lazy', isa => ConsumerOf [ __PACKAGE__ . '::Base' ] ); |
16
|
|
|
|
|
|
|
has args => ( is => 'ro', isa => HashRef, required => 1 ); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
around BUILDARGS => sub { |
19
|
|
|
|
|
|
|
my $orig = shift; |
20
|
|
|
|
|
|
|
my $class = shift; |
21
|
|
|
|
|
|
|
my $orig_args = $class->$orig(@_); |
22
|
|
|
|
|
|
|
my $args = { args => $orig_args }; |
23
|
|
|
|
|
|
|
$args->{subclass} = $args->{subclass} if $args->{subclass}; |
24
|
|
|
|
|
|
|
return $args; |
25
|
|
|
|
|
|
|
}; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub _build_subclass { |
28
|
0
|
|
|
0
|
|
|
my ($self) = @_; |
29
|
0
|
|
|
|
|
|
my $subclass = dispatch_subclass( $self->args->{dbh} ); |
30
|
0
|
|
|
|
|
|
Class::Load::load_class($subclass); |
31
|
0
|
|
|
|
|
|
return $subclass->new( $self->args ); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub dispatch_subclass { |
35
|
0
|
|
|
0
|
0
|
|
my ($obj) = @_; |
36
|
0
|
|
|
|
|
|
my $subclass = __PACKAGE__; |
37
|
0
|
0
|
|
|
|
|
if ( $obj->isa('DBI::db') ) { |
|
|
0
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
$subclass .= '::DBI'; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
elsif ( $obj->isa('DBIx::Class::Schema') ) { |
41
|
0
|
|
|
|
|
|
$subclass .= '::DBIC'; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
else { |
44
|
0
|
|
|
|
|
|
croak( sprintf( "Can't dispatch subclass from args: 'dbh': %s", ref $obj ) ); |
45
|
|
|
|
|
|
|
} |
46
|
0
|
|
|
|
|
|
return $subclass; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub table_data { |
50
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
51
|
0
|
|
|
|
|
|
$self->subclass->table_data(@_); |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
1; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
__END__ |