blib/lib/Froody/Upload.pm

filter: Statementstmt 73.3% 11 / 15 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 100% 1 / 1 totaltotal 68.1% 15 / 22 CC 2 SCAR 11.0
CC
2
Cov
65%
from_file
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« blib/lib/Froody/Repository.pm ↑ Summary blib/lib/Froody/Response/XML.pm »
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
BranchTrueFalseTotal
open my $fh, $filename or die "Can't open ${filename}: $!" 0 0 0
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;
« blib/lib/Froody/Repository.pm ↑ Summary blib/lib/Froody/Response/XML.pm »