| 1 | package Text::CSV::Unicode; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 3 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 3 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 3 | ▶ | use base qw(Text::CSV); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | 3 | our $VERSION = '0.399_001'; | |||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | sub new { | ||||||||||||||||||||||||||||
| 11 | 5 | ▶ | my ($self, $hash) = @_; | ||||||||||||||||||||||||||
|
Subroutine
new: called CC=4 SCAR=13.9
Pod
documented
| |||||||||||||||||||||||||||||
| 12 | 5 | ▶ | if ( $hash and $hash -> {binary} ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$hash and $hash->{"binary"}
MC/DC100%2/2
$hash and $hash->{"binary"}
$hash
$hash->{"binary"}
Truth table100%3/3
A and B
A= $hashB= $hash->{"binary"}
| |||||||||||||||||||||||||||||
| 13 | 2 | warnings::warnif("deprecated", | |||||||||||||||||||||||||||
| 14 | "binary is deprecated: use Text::CSV"); | ||||||||||||||||||||||||||||
| 15 | 2 | return Text::CSV->new( $hash ); | |||||||||||||||||||||||||||
| 16 | } | ||||||||||||||||||||||||||||
| 17 | 3 | ▶ | return $self->SUPER::new( { binary => 1, %{ $hash || {} } } ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 18 | } | ||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | sub combine { | ||||||||||||||||||||||||||||
| 21 | 11 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
combine: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||
| 22 | 11 | ▶ | for (grep defined, @_) { return unless _ok(); } | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 23 | 10 | return $self->SUPER::combine(@_); | |||||||||||||||||||||||||||
| 24 | } | ||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||
| 26 | sub parse { | ||||||||||||||||||||||||||||
| 27 | 8 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
parse: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||
| 28 | 8 | for (map +$_, grep defined, @_) { | |||||||||||||||||||||||||||
| 29 | 7 | chomp; | |||||||||||||||||||||||||||
| 30 | 7 | ▶ | return unless _ok(); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 31 | } | ||||||||||||||||||||||||||||
| 32 | 7 | return $self->SUPER::parse( @_ ); | |||||||||||||||||||||||||||
| 33 | } | ||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | 27 | ▶ | sub _ok { m{\A [\t \P{Cntrl}]* \z}x; } # test $_ | ||||||||||||||||||||||||||
|
Subroutine
_ok: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||
| 37 | 3 | 1; | |||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||
| 40 | __END__ | ||||||||||||||||||||||||||||