| 1 | package TieCSV; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 1 | require Tie::Handle; | |||||||||
| 6 | |||||||||||
| 7 | 1 | our @ISA = qw(Tie::Handle); | |||||||||
| 8 | |||||||||||
| 9 | 1 | our $VERSION = 0.01; | |||||||||
| 10 | |||||||||||
| 11 | 1 | my $csv; | |||||||||
| 12 | sub TIEHANDLE | ||||||||||
| 13 | 1 | ▶ | { | ||||||||
|
Subroutine
TIEHANDLE: called CC=1 SCAR=0.0
| |||||||||||
| 14 | 1 | my $class = shift; | |||||||||
| 15 | 1 | $csv = shift; | |||||||||
| 16 | 1 | my $fh = local *ARGV; | |||||||||
| 17 | 1 | bless \$fh, $class; | |||||||||
| 18 | } | ||||||||||
| 19 | |||||||||||
| 20 | sub READLINE | ||||||||||
| 21 | 0 | ▶ | { | ||||||||
|
Subroutine
READLINE: not called CC=2 SCAR=17.9
| |||||||||||
| 22 | 0 | my $self = shift; | |||||||||
| 23 | 0 | my $line = <$self>; | |||||||||
| 24 | 0 | ▶ | if ($line) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 25 | { | ||||||||||
| 26 | 0 | my $status = $csv->parse($line); | |||||||||
| 27 | 0 | @::f = $csv->fields(); | |||||||||
| 28 | 0 | return $line; | |||||||||
| 29 | } | ||||||||||
| 30 | 0 | return; | |||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | 1 | 1; | |||||||||
| 34 | |||||||||||
| 35 | __END__ | ||||||||||