line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package TableDataRole::Source::CSVInDATA; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
2063
|
use 5.010001; |
|
4
|
|
|
|
|
16
|
|
4
|
4
|
|
|
4
|
|
22
|
use strict; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
76
|
|
5
|
4
|
|
|
4
|
|
18
|
use warnings; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
106
|
|
6
|
|
|
|
|
|
|
|
7
|
4
|
|
|
4
|
|
25
|
use Role::Tiny; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
21
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY |
10
|
|
|
|
|
|
|
our $DATE = '2023-06-14'; # DATE |
11
|
|
|
|
|
|
|
our $DIST = 'TableDataRoles-Standard'; # DIST |
12
|
|
|
|
|
|
|
our $VERSION = '0.016'; # VERSION |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
with 'TableDataRole::Spec::Basic'; |
15
|
|
|
|
|
|
|
with 'TableDataRole::Source::CSVInFile'; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
around new => sub { |
18
|
|
|
|
|
|
|
my $orig = shift; |
19
|
|
|
|
|
|
|
my ($class, %args) = @_; |
20
|
|
|
|
|
|
|
die "Unknown argument(s): ". join(", ", sort keys %args) |
21
|
|
|
|
|
|
|
if keys %args; |
22
|
|
|
|
|
|
|
|
23
|
4
|
|
|
4
|
|
1256
|
no strict 'refs'; ## no critic: TestingAndDebugging::ProhibitNoStrict |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
484
|
|
24
|
|
|
|
|
|
|
my $fh = \*{"$class\::DATA"}; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
my $obj = $orig->(@_, filehandle => $fh); |
27
|
|
|
|
|
|
|
}; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
# ABSTRACT: Role to access table data from CSV in DATA section |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |