Filename | /usr/share/perl5/CGI/File/Temp.pm |
Statements | Executed 8 statements in 269µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 17µs | 34.5ms | BEGIN@8 | CGI::File::Temp::
1 | 1 | 1 | 12µs | 45µs | BEGIN@12 | CGI::File::Temp::
1 | 1 | 1 | 10µs | 1.35ms | BEGIN@9 | CGI::File::Temp::
0 | 0 | 0 | 0s | 0s | _mp_filename | CGI::File::Temp::
0 | 0 | 0 | 0s | 0s | asString | CGI::File::Temp::
0 | 0 | 0 | 0s | 0s | compare | CGI::File::Temp::
0 | 0 | 0 | 0s | 0s | handle | CGI::File::Temp::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # this is a back compatibility wrapper around File::Temp. DO NOT | ||||
2 | # use this package outside of CGI, i won't provide any help if | ||||
3 | # you use it directly and your code breaks horribly. | ||||
4 | package CGI::File::Temp; | ||||
5 | |||||
6 | 1 | 400ns | $CGI::File::Temp::VERSION = '4.09'; | ||
7 | |||||
8 | 2 | 74µs | 2 | 69.0ms | # spent 34.5ms (17µs+34.5) within CGI::File::Temp::BEGIN@8 which was called:
# once (17µs+34.5ms) by CGI::BEGIN@5 at line 8 # spent 34.5ms making 1 call to CGI::File::Temp::BEGIN@8
# spent 34.5ms making 1 call to parent::import |
9 | 2 | 71µs | 2 | 2.69ms | # spent 1.35ms (10µs+1.34) within CGI::File::Temp::BEGIN@9 which was called:
# once (10µs+1.34ms) by CGI::BEGIN@5 at line 9 # spent 1.35ms making 1 call to CGI::File::Temp::BEGIN@9
# spent 1.34ms making 1 call to parent::import |
10 | |||||
11 | use overload | ||||
12 | 1 | 7µs | 1 | 33µs | # spent 45µs (12+33) within CGI::File::Temp::BEGIN@12 which was called:
# once (12µs+33µs) by CGI::BEGIN@5 at line 14 # spent 33µs making 1 call to overload::import |
13 | 'cmp' => \&compare, | ||||
14 | 1 | 114µs | 1 | 45µs | 'fallback'=>1; # spent 45µs making 1 call to CGI::File::Temp::BEGIN@12 |
15 | |||||
16 | # back compatibility method since we now return a File::Temp object | ||||
17 | # as the filehandle (which isa IO::Handle) so calling ->handle on | ||||
18 | # it will fail. FIXME: deprecate this method in v5+ | ||||
19 | sub handle { return shift; }; | ||||
20 | |||||
21 | sub compare { | ||||
22 | my ( $self,$value ) = @_; | ||||
23 | return "$self" cmp $value; | ||||
24 | } | ||||
25 | |||||
26 | sub _mp_filename { | ||||
27 | my ( $self,$filename ) = @_; | ||||
28 | ${*$self}->{ _mp_filename } = $filename | ||||
29 | if $filename; | ||||
30 | return ${*$self}->{_mp_filename}; | ||||
31 | } | ||||
32 | |||||
33 | sub asString { | ||||
34 | my ( $self ) = @_; | ||||
35 | return $self->_mp_filename; | ||||
36 | } | ||||
37 | |||||
38 | 1 | 2µs | 1; | ||
39 |