Lines 122-128
sub cgi {
Link Here
|
122 |
|
122 |
|
123 |
sub count { |
123 |
sub count { |
124 |
my ( $self ) = @_; |
124 |
my ( $self ) = @_; |
125 |
return scalar grep { !exists $self->{files}->{$_}->{errcode} } keys $self->{files}; |
125 |
return scalar grep { !exists $self->{files}->{$_}->{errcode} } keys %{ $self->{files} }; |
126 |
} |
126 |
} |
127 |
|
127 |
|
128 |
=head2 result |
128 |
=head2 result |
Lines 135-141
sub result {
Link Here
|
135 |
my ( $self ) = @_; |
135 |
my ( $self ) = @_; |
136 |
my @a = map { $self->{files}->{$_}->{id} } |
136 |
my @a = map { $self->{files}->{$_}->{id} } |
137 |
grep { !exists $self->{files}->{$_}->{errcode} } |
137 |
grep { !exists $self->{files}->{$_}->{errcode} } |
138 |
keys $self->{files}; |
138 |
keys %{ $self->{files} }; |
139 |
return @a? ( join ',', @a ): undef; |
139 |
return @a? ( join ',', @a ): undef; |
140 |
} |
140 |
} |
141 |
|
141 |
|
Lines 149-155
sub result {
Link Here
|
149 |
sub err { |
149 |
sub err { |
150 |
my ( $self ) = @_; |
150 |
my ( $self ) = @_; |
151 |
my $err; |
151 |
my $err; |
152 |
foreach my $f ( keys $self->{files} ) { |
152 |
foreach my $f ( keys %{ $self->{files} } ) { |
153 |
my $e = $self->{files}->{$f}->{errcode}; |
153 |
my $e = $self->{files}->{$f}->{errcode}; |
154 |
$err->{ $f } = $e if $e; |
154 |
$err->{ $f } = $e if $e; |
155 |
} |
155 |
} |
Lines 328-334
sub _hook {
Link Here
|
328 |
sub _done { |
328 |
sub _done { |
329 |
my ( $self ) = @_; |
329 |
my ( $self ) = @_; |
330 |
$self->{done} = 1; |
330 |
$self->{done} = 1; |
331 |
foreach my $f ( keys $self->{files} ) { |
331 |
foreach my $f ( keys %{ $self->{files} } ) { |
332 |
my $fh = $self->_fh($f); |
332 |
my $fh = $self->_fh($f); |
333 |
$self->_register( $f, $fh? tell( $fh ): undef ) |
333 |
$self->_register( $f, $fh? tell( $fh ): undef ) |
334 |
if !$self->{files}->{$f}->{errcode}; |
334 |
if !$self->{files}->{$f}->{errcode}; |
335 |
- |
|
|