| 1 | package Froody::Upload; | ||||||||||
| 2 | 27 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 27 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 27 | ▶ | use base 'Froody::Base'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 27 | __PACKAGE__->mk_accessors(qw( fh filename client_filename mime_type )); | |||||||||
| 8 | |||||||||||
| 9 | =head1 NAME | ||||||||||
| 10 | |||||||||||
| 11 | Froody::Upload - wrapper class for uploaded data in Froody | ||||||||||
| 12 | |||||||||||
| 13 | =head1 SYNOPSIS | ||||||||||
| 14 | |||||||||||
| 15 | # used internally | ||||||||||
| 16 | |||||||||||
| 17 | =head1 DESCRIPTION | ||||||||||
| 18 | |||||||||||
| 19 | This module represents uploads | ||||||||||
| 20 | |||||||||||
| 21 | =head2 Accessors | ||||||||||
| 22 | |||||||||||
| 23 | These are get/set accessors on the instance. | ||||||||||
| 24 | |||||||||||
| 25 | =over | ||||||||||
| 26 | |||||||||||
| 27 | =item fh | ||||||||||
| 28 | |||||||||||
| 29 | =item filename | ||||||||||
| 30 | |||||||||||
| 31 | =item client_filename | ||||||||||
| 32 | |||||||||||
| 33 | =item mime_type | ||||||||||
| 34 | |||||||||||
| 35 | =back | ||||||||||
| 36 | |||||||||||
| 37 | =head2 EASY CONSTRUCTOR | ||||||||||
| 38 | |||||||||||
| 39 | =over | ||||||||||
| 40 | |||||||||||
| 41 | =item from_file( filename ) | ||||||||||
| 42 | |||||||||||
| 43 | =cut | ||||||||||
| 44 | |||||||||||
| 45 | 0 | ▶ | sub from_file { | ||||||||
|
Subroutine
from_file: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 46 | 0 | my $class = shift; | |||||||||
| 47 | 0 | my $filename = shift; | |||||||||
| 48 | 0 | ▶ | open my $fh, $filename or die "Can't open $filename: $!"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 49 | 0 | return $class->new->fh($fh)->filename($filename); | |||||||||
| 50 | } | ||||||||||
| 51 | |||||||||||
| 52 | =back | ||||||||||
| 53 | |||||||||||
| 54 | =head1 BUGS | ||||||||||
| 55 | |||||||||||
| 56 | None known. | ||||||||||
| 57 | |||||||||||
| 58 | Please report any bugs you find via the CPAN RT system. | ||||||||||
| 59 | L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Froody> | ||||||||||
| 60 | |||||||||||
| 61 | =head1 AUTHOR | ||||||||||
| 62 | |||||||||||
| 63 | Copyright Fotango 2005. All rights reserved. | ||||||||||
| 64 | |||||||||||
| 65 | Please see the main L<Froody> documentation for details of who has worked | ||||||||||
| 66 | on this project. | ||||||||||
| 67 | |||||||||||
| 68 | This module is free software; you can redistribute it and/or modify it under | ||||||||||
| 69 | the same terms as Perl itself. | ||||||||||
| 70 | |||||||||||
| 71 | =head1 SEE ALSO | ||||||||||
| 72 | |||||||||||
| 73 | L<Froody>, L<Froody::Request::Apache>, L<Froody::Request::CGI>, L<Froody::XML> | ||||||||||
| 74 | |||||||||||
| 75 | =cut | ||||||||||
| 76 | |||||||||||
| 77 | 27 | 1; | |||||||||