line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Amazon::MechanicalTurk::RowData; |
2
|
6
|
|
|
6
|
|
91406
|
use strict; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
231
|
|
3
|
6
|
|
|
6
|
|
31
|
use warnings; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
158
|
|
4
|
6
|
|
|
6
|
|
2300
|
use Net::Amazon::MechanicalTurk::BaseObject; |
|
6
|
|
|
|
|
16
|
|
|
6
|
|
|
|
|
2004
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '1.00'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our @ISA = qw{ Net::Amazon::MechanicalTurk::BaseObject }; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Net::Amazon::MechanicalTurk::RowData->attributes(qw{ |
11
|
|
|
|
|
|
|
fieldNames |
12
|
|
|
|
|
|
|
}); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub toRowData { |
15
|
4
|
|
|
4
|
0
|
928
|
my ($class, $rowdata) = @_; |
16
|
4
|
50
|
|
|
|
57
|
if (UNIVERSAL::isa($rowdata, "Net::Amazon::MechanicalTurk::RowData")) { |
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
17
|
0
|
|
|
|
|
0
|
return $rowdata; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
elsif (UNIVERSAL::isa($rowdata, "ARRAY")) { |
20
|
1
|
|
|
|
|
793
|
require Net::Amazon::MechanicalTurk::RowData::ArrayHashRowData; |
21
|
1
|
|
|
|
|
13
|
return Net::Amazon::MechanicalTurk::RowData::ArrayHashRowData->new( |
22
|
|
|
|
|
|
|
array => $rowdata |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
elsif (UNIVERSAL::isa($rowdata, "CODE")) { |
26
|
1
|
|
|
|
|
883
|
require Net::Amazon::MechanicalTurk::RowData::SubroutineRowData; |
27
|
1
|
|
|
|
|
12
|
return Net::Amazon::MechanicalTurk::RowData::SubroutineRowData->new( |
28
|
|
|
|
|
|
|
sub => $rowdata |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
elsif ($rowdata =~ /\.csv$/i) { |
32
|
1
|
|
|
|
|
614
|
require Net::Amazon::MechanicalTurk::RowData::DelimitedRowData; |
33
|
1
|
|
|
|
|
569
|
require Net::Amazon::MechanicalTurk::DelimitedReader; |
34
|
1
|
|
|
|
|
10
|
return Net::Amazon::MechanicalTurk::RowData::DelimitedRowData->new( |
35
|
|
|
|
|
|
|
reader => Net::Amazon::MechanicalTurk::DelimitedReader->new( |
36
|
|
|
|
|
|
|
file => $rowdata, |
37
|
|
|
|
|
|
|
fieldSeparator => "," |
38
|
|
|
|
|
|
|
) |
39
|
|
|
|
|
|
|
); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
else { # Defaults to tab delimited |
42
|
1
|
|
|
|
|
583
|
require Net::Amazon::MechanicalTurk::RowData::DelimitedRowData; |
43
|
1
|
|
|
|
|
657
|
require Net::Amazon::MechanicalTurk::DelimitedReader; |
44
|
1
|
|
|
|
|
10
|
return Net::Amazon::MechanicalTurk::RowData::DelimitedRowData->new( |
45
|
|
|
|
|
|
|
reader => Net::Amazon::MechanicalTurk::DelimitedReader->new( |
46
|
|
|
|
|
|
|
file => $rowdata, |
47
|
|
|
|
|
|
|
fieldSeparator => "\t" |
48
|
|
|
|
|
|
|
) |
49
|
|
|
|
|
|
|
); |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub each { |
54
|
0
|
|
|
0
|
0
|
|
my ($self, $block, @blockXArgs) = @_; |
55
|
|
|
|
|
|
|
# Subclass should implement |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
return 1; |