line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package TableDataRole::Source::CSVInDATA; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
1510
|
use 5.010001; |
|
4
|
|
|
|
|
12
|
|
4
|
4
|
|
|
4
|
|
16
|
use strict; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
60
|
|
5
|
4
|
|
|
4
|
|
12
|
use warnings; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
70
|
|
6
|
|
|
|
|
|
|
|
7
|
4
|
|
|
4
|
|
14
|
use Role::Tiny; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
17
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY |
10
|
|
|
|
|
|
|
our $DATE = '2022-02-20'; # DATE |
11
|
|
|
|
|
|
|
our $DIST = 'TableDataRoles-Standard'; # DIST |
12
|
|
|
|
|
|
|
our $VERSION = '0.014'; # 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
|
|
988
|
no strict 'refs'; ## no critic: TestingAndDebugging::ProhibitNoStrict |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
378
|
|
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__ |