line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JQuery::DataTables::Heavy; |
2
|
1
|
|
|
1
|
|
798
|
use 5.008005; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
32
|
|
3
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
4
|
1
|
|
|
1
|
|
16
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
47
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = "0.03"; |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
3153
|
use Moo; |
|
1
|
|
|
|
|
28772
|
|
|
1
|
|
|
|
|
8
|
|
9
|
1
|
|
|
1
|
|
3357
|
use MooX::Types::MooseLike::Base qw(:all); |
|
1
|
|
|
|
|
14490
|
|
|
1
|
|
|
|
|
560
|
|
10
|
1
|
|
|
1
|
|
12
|
use Carp; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
73
|
|
11
|
1
|
|
|
1
|
|
1377
|
use Class::Load (); |
|
1
|
|
|
|
|
41900
|
|
|
1
|
|
|
|
|
30
|
|
12
|
1
|
|
|
1
|
|
9
|
use namespace::clean; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
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__ |