Helper/Model/File.pm untested

filter: Statementstmt 0.0% 0 / 14 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 22 CC 1 SCAR 6.9
CC
1
Cov
0%
mk_compclass
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Catalyst::Helper::Model::File;
2  
3 use strict;
4 use warnings;
5 use Carp;
6  
7 =head1 NAME
8  
9 Catalyst::Helper::Model::File - Helper for File based Models
10  
11 =head1 SYNOPSIS
12  
13 script/create.pl model Foo File [root_storage_directory]
14  
15 Where:
16 Foo is the short name for the Model class being generated
17 root_storage_directory is the (full) path of where to store files
18  
19 =head1 TYPICAL EXAMPLES
20  
21 script/myapp_create.pl model Foo File var/file_storage
22  
23  
24 =head1 DESCRIPTION
25  
26 Helper for the File base storage Model
27  
28 =head1 METHODS
29  
30 =head2 mk_compclass
31  
32 =cut
33  
34 sub mk_compclass {
35 my ( $self, $helper, $path) = @_;
36  
37 $helper->{root_dir} = $path or die "root_dir config option must be specified for this model\n";
38  
39 my $file = $helper->{file};
40 $helper->render_file( 'compclass', $file );
41 }
42  
43 =head1 SEE ALSO
44  
45 General Catalyst Stuff:
46  
47 L<Catalyst::Manual>, L<Catalyst::Test>, L<Catalyst::Request>,
48 L<Catalyst::Response>, L<Catalyst::Helper>, L<Catalyst>,
49  
50 Stuff related to this Model:
51  
52 L<Catalyst::Model::File>
53  
54 =head1 AUTHOR
55  
56 Ash Berlin, C<ash@cpan.org>
57  
58 =head1 LICENSE
59  
60 This library is free software, you can redistribute it and/or modify
61 it under the same terms as Perl itself.
62  
63 =cut
64  
65 1;
66  
67 __DATA__