line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package TableDataRole::Source::CSVInDATA; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
1904
|
use 5.010001; |
|
4
|
|
|
|
|
15
|
|
4
|
4
|
|
|
4
|
|
22
|
use strict; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
77
|
|
5
|
4
|
|
|
4
|
|
30
|
use warnings; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
106
|
|
6
|
|
|
|
|
|
|
|
7
|
4
|
|
|
4
|
|
19
|
use Role::Tiny; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
31
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY |
10
|
|
|
|
|
|
|
our $DATE = '2023-02-24'; # DATE |
11
|
|
|
|
|
|
|
our $DIST = 'TableDataRoles-Standard'; # DIST |
12
|
|
|
|
|
|
|
our $VERSION = '0.015'; # 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
|
|
1243
|
no strict 'refs'; ## no critic: TestingAndDebugging::ProhibitNoStrict |
|
4
|
|
|
|
|
15
|
|
|
4
|
|
|
|
|
490
|
|
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__ |