blib/lib/HTML/Tested/Value/Upload.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 15 | 15 | 100.0 |
branch | 2 | 2 | 100.0 |
condition | n/a | ||
subroutine | 6 | 6 | 100.0 |
pod | 2 | 3 | 66.6 |
total | 25 | 26 | 96.1 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | =head1 NAME | ||||||
2 | |||||||
3 | HTML::Tested::Value::Upload - Upload widget. | ||||||
4 | |||||||
5 | =head1 DESCRIPTION | ||||||
6 | |||||||
7 | Provides widget. | ||||||
8 | |||||||
9 | In C |
||||||
10 | returns C |
||||||
11 | |||||||
12 | =cut | ||||||
13 | 17 | 17 | 188 | use strict; | |||
17 | 34 | ||||||
17 | 881 | ||||||
14 | 17 | 17 | 90 | use warnings FATAL => 'all'; | |||
17 | 33 | ||||||
17 | 1509 | ||||||
15 | |||||||
16 | package HTML::Tested::Value::Upload; | ||||||
17 | 17 | 17 | 99 | use base 'HTML::Tested::Value'; | |||
17 | 32 | ||||||
17 | 11464 | ||||||
18 | |||||||
19 | sub absorb_one_value { | ||||||
20 | 4 | 4 | 1 | 13 | my ($self, $root, $val, @path) = @_; | ||
21 | 4 | 100 | 17 | $val = $val->fh unless $self->options->{object}; | |||
22 | 4 | 46 | $root->{ $self->name } = $val; | ||||
23 | } | ||||||
24 | |||||||
25 | 4 | 4 | 0 | 11 | sub prepare_value { return ''; } | ||
26 | |||||||
27 | sub value_to_string { | ||||||
28 | 4 | 4 | 1 | 9 | my ($self, $name, $val) = @_; | ||
29 | return < | ||||||
30 | |||||||
31 | ENDS | ||||||
32 | 4 | 21 | } | ||||
33 | |||||||
34 | 1; | ||||||
35 | |||||||
36 | =head1 AUTHOR | ||||||
37 | |||||||
38 | Boris Sukholitko | ||||||
39 | CPAN ID: BOSU | ||||||
40 | |||||||
41 | boriss@gmail.com | ||||||
42 | |||||||
43 | |||||||
44 | =head1 COPYRIGHT | ||||||
45 | |||||||
46 | This program is free software; you can redistribute | ||||||
47 | it and/or modify it under the same terms as Perl itself. | ||||||
48 | |||||||
49 | The full text of the license can be found in the | ||||||
50 | LICENSE file included with this module. | ||||||
51 | |||||||
52 | =cut | ||||||
53 |