blib/lib/FormValidator/Lite/Upload/CGI.pm

filter: Statementstmt 100% 19 / 19 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 4 totaltotal 84.3% 27 / 32 SCAR 6.9
CC
2
Cov
95%
new
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.0
« blib/lib/FormValidator/Lite/Messages/ja.pm ↑ Summary blib/lib/FormValidator/Lite/Constraint/Number.pm »
1 package FormValidator::Lite::Upload::CGI;
2 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use base qw/FormValidator::Lite::Upload/;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 sub new {
7 11 ▶ my ($class, $q, $name) = @_;
Subroutine new: called CC=2 SCAR=7.0
Pod undocumented
8 11 my $file = $q->param($name);
9 11 ▶ return unless $file;
Branch: 1 branch
BranchTrueFalseTotal
unless $file 0 11 11
10  
11 11 my $info = $q->uploadInfo($file);
12 11 bless {
13 q => $q,
14 name => $name,
15 info => $info,
16 }, $class;
17 }
18  
19 6 ▶sub size { shift->{info}->{'Content-Length'} }
Subroutine size: called CC=1 SCAR=0.0
Pod undocumented
20 7 ▶sub type { shift->{info}->{'Content-Type'} }
Subroutine type: called CC=1 SCAR=0.0
Pod undocumented
21  
22 sub fh {
23 2 ▶ my ($self, ) = @_;
Subroutine fh: called CC=1 SCAR=0.0
Pod undocumented
24 2 $self->{q}->upload($self->{name});
25 }
26  
27 3 1;
« blib/lib/FormValidator/Lite/Messages/ja.pm ↑ Summary blib/lib/FormValidator/Lite/Constraint/Number.pm »