« blib/lib/FormValidator/Lite/Hash.pm
↑ Summary
blib/lib/FormValidator/Lite/Upload/PlackRequest.pm »
| 1 | package FormValidator::Lite::Upload::HTTPEngine; | ||
| 2 | use strict; | ||
| 3 | use warnings; | ||
| 4 | use base qw/FormValidator::Lite::Upload/; | ||
| 5 | |||
| 6 | sub new { | ||
| 7 | my ($class, $q, $name) = @_; | ||
| 8 | my $upload = $q->upload($name); | ||
| 9 | return unless $upload; | ||
| 10 | |||
| 11 | bless { | ||
| 12 | q => $q, | ||
| 13 | name => $name, | ||
| 14 | upload => $upload, | ||
| 15 | }, $class; | ||
| 16 | } | ||
| 17 | |||
| 18 | sub size { shift->{upload}->size } | ||
| 19 | sub type { shift->{upload}->type } | ||
| 20 | |||
| 21 | sub fh { | ||
| 22 | my ($self, ) = @_; | ||
| 23 | $self->{upload}->fh; | ||
| 24 | } | ||
| 25 | |||
| 26 | 1; |