blib/lib/CFDI/Output/CSV.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 3 | 8 | 37.5 |
branch | 0 | 4 | 0.0 |
condition | 0 | 3 | 0.0 |
subroutine | 1 | 2 | 50.0 |
pod | 0 | 1 | 0.0 |
total | 4 | 18 | 22.2 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package CFDI::Output::CSV; | ||||||
2 | |||||||
3 | 1 | 1 | 5 | use strict; | |||
1 | 2 | ||||||
1 | 112 | ||||||
4 | |||||||
5 | require Exporter; | ||||||
6 | our @EXPORT = qw(output); | ||||||
7 | our @ISA = qw(Exporter); | ||||||
8 | our $VERSION = 0.2; | ||||||
9 | |||||||
10 | |||||||
11 | sub output(_){ | ||||||
12 | 0 | 0 | 0 | local $_ = shift; | |||
13 | 0 | 0 | 0 | return unless defined && ref eq 'ARRAY'; | |||
14 | 0 | 0 | join$/,map{join',',map{defined$_?'"'.$_.'"':'""'}@$_}@$_; | ||||
0 | |||||||
0 | |||||||
15 | } | ||||||
16 | |||||||
17 | |||||||
18 | 1; |