ASP/UploadHookArgs.pm untested

filter: Statementstmt 0.0% 0 / 18 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 2 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 3 totaltotal 0.0% 0 / 30 CC 2 SCAR 12.0
CC
2
Cov
0%
AUTOLOAD
6.0
new
2.0
DESTROY
2.0
CRAP 3.3
1
2 package Apache2::ASP::UploadHookArgs;
3
4 use strict;
5 use warnings 'all';
6
7 #==============================================================================
8 sub new
9 {
10 my ($s, %args) = @_;
11
12 exists($args{$_}) or die "Required parameter '$_' was not provided" foreach qw(
13 upload
14 percent_complete
15 elapsed_time
16 total_expected_time
17 time_remaining
18 length_received
19 data
20 );
21 $args{content_length} = $ENV{CONTENT_LENGTH};
22 $args{new_file} = undef;
23 $args{filename_only} = undef;
24 $args{link_to_file} = undef;
25
26 return bless \%args, $s;
27 }# end new()
28
29
30 #==============================================================================
31 sub AUTOLOAD
32 {
33 my $s = shift;
34 our $AUTOLOAD;
35 my ($key) = $AUTOLOAD =~ m/::([^:]+)$/;
36 return exists($s->{$key}) ? $s->{$key} : die "Invalid UploadHookArgs key '$key'";
37 }# end AUTOLOAD()
38
39 sub DESTROY { }
40
41 1;# return true:
42
43 __END__