line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
use Modern::Perl; |
2
|
5
|
|
|
5
|
|
33
|
our $AUTHORITY = 'cpan:GEEKRUTH'; # AUTHORITY |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
31
|
|
3
|
|
|
|
|
|
|
use Carp; |
4
|
5
|
|
|
5
|
|
604
|
use Class::C3::Componentised; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
242
|
|
5
|
5
|
|
|
5
|
|
29
|
use curry 2.000001; |
|
5
|
|
|
|
|
12
|
|
|
5
|
|
|
|
|
125
|
|
6
|
5
|
|
|
5
|
|
2808
|
use Moo; |
|
5
|
|
|
|
|
1531
|
|
|
5
|
|
|
|
|
189
|
|
7
|
5
|
|
|
5
|
|
30
|
|
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
31
|
|
8
|
|
|
|
|
|
|
has schema_class => (is => 'ro', required => 1); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has dsn => (is => 'ro', required => 1); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has user => (is => 'ro'); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
has password => (is => 'ro'); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
has schema => ( |
17
|
|
|
|
|
|
|
is => 'lazy', |
18
|
|
|
|
|
|
|
builder => sub { |
19
|
|
|
|
|
|
|
my ($self) = @_; |
20
|
10
|
|
|
10
|
|
90
|
$self->_ensure_schema_class_loaded->connect( $self->dsn, $self->user, $self->password ); |
21
|
10
|
|
|
|
|
32
|
}, |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
has export_prefix => (is => 'ro'); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
my ( $self, $method ) = @_; |
27
|
|
|
|
|
|
|
return $method unless $self->export_prefix; |
28
|
36
|
|
|
36
|
|
56
|
return join( '_', $self->export_prefix, $method ); |
29
|
36
|
50
|
|
|
|
95
|
} |
30
|
0
|
|
|
|
|
0
|
|
31
|
|
|
|
|
|
|
my ($self) = @_; |
32
|
|
|
|
|
|
|
my $class = $self->_ensure_schema_class_loaded; |
33
|
|
|
|
|
|
|
return () unless $class->can('resultset_name_methods'); |
34
|
10
|
|
|
10
|
|
25
|
sort keys %{ $class->resultset_name_methods }; |
35
|
10
|
|
|
|
|
33
|
} |
36
|
10
|
100
|
|
|
|
130
|
|
37
|
6
|
|
|
|
|
23
|
croak 'No schema class defined' if !$_[0]->schema_class; |
|
6
|
|
|
|
|
121
|
|
38
|
|
|
|
|
|
|
eval { Class::C3::Componentised->ensure_class_loaded( $_[0]->schema_class ); 1; } |
39
|
|
|
|
|
|
|
or croak 'Schema class ' . $_[0]->schema_class . ' unable to load'; |
40
|
|
|
|
|
|
|
return $_[0]->schema_class; |
41
|
20
|
50
|
|
20
|
|
82
|
} |
42
|
20
|
50
|
|
|
|
40
|
|
|
20
|
|
|
|
|
101
|
|
|
20
|
|
|
|
|
1535565
|
|
43
|
|
|
|
|
|
|
my ($self) = @_; |
44
|
20
|
|
|
|
|
228
|
my $schema = $self->schema; |
45
|
|
|
|
|
|
|
my %kw; |
46
|
|
|
|
|
|
|
## no critic qw(Variables::ProhibitPackageVars) |
47
|
|
|
|
|
|
|
$kw{$_} = $schema->$curry::curry($_) for $self->_rs_name_methods; |
48
|
10
|
|
|
10
|
0
|
38
|
return map { |
49
|
10
|
|
|
|
|
164
|
$self->_maybe_prefix_method($_) |
50
|
10
|
|
|
|
|
262585
|
=> do { |
51
|
|
|
|
|
|
|
my $code = $kw{$_}; |
52
|
10
|
|
|
|
|
41
|
sub { shift; &$code } |
53
|
|
|
|
|
|
|
} |
54
|
10
|
|
|
|
|
523
|
} sort keys %kw; |
55
|
36
|
|
|
|
|
76
|
} |
56
|
36
|
|
|
|
|
53
|
|
57
|
11
|
|
|
11
|
|
631008
|
1; |
|
11
|
|
|
|
|
54
|
|
58
|
36
|
|
|
|
|
141
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=pod |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=encoding UTF-8 |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 NAME |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Dancer2::Plugin::DBIx::Class::ExportBuilder |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 VERSION |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
version 1.1001 |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 AUTHOR |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
D Ruth Holloway <ruth@hiruthie.me> |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
This software is copyright (c) 2022, 2021 by D Ruth Holloway. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
81
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=cut |