lib/Catalyst/Helper/HTML/FormHandler/Scripts.pm

filter: Statementstmt 63.1% 12 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 1 totaltotal 62.5% 15 / 24 CC 1 SCAR 2.2
CC
1
Cov
63%
mk_stuff
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
↑ Summary
1 #
2 # This file is part of Catalyst-Helper-HTML-FormHandler-Scripts
3 #
4 # This software is Copyright (c) 2011 by Chris Weyl.
5 #
6 # This is free software, licensed under:
7 #
8 # The GNU Lesser General Public License, Version 2.1, February 1999
9 #
10 package Catalyst::Helper::HTML::FormHandler::Scripts;
11 {
12 2 $Catalyst::Helper::HTML::FormHandler::Scripts::VERSION = '0.001';
13 }
14  
15 # ABSTRACT: Create a script/myapp_hfh.pl to help with forms
16  
17 2 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 2 ▶use common::sense;
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 2 ▶use File::Spec;
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 0 ▶sub mk_stuff {
Subroutine mk_stuff: not called CC=1 SCAR=6.9
Pod undocumented
23 0 my ($self, $helper, $args) = @_;
24  
25 0 my $base = $helper->{base};
26 0 my $app = lc $helper->{app};
27  
28 0 $app =~ s/::/_/g;
29  
30 0 my $script = File::Spec->catfile($base, 'script', $app.'_hfh.pl');
31 0 $helper->render_file('hfh', $script);
32 0 chmod 0755, $script;
33 }
34  
35  
36 2 1;
37  
38  
39  
40  
41 =pod
42  
43 =head1 NAME
44  
45 Catalyst::Helper::HTML::FormHandler::Scripts - Create a script/myapp_hfh.pl to help with forms
46  
47 =head1 VERSION
48  
49 version 0.001
50  
51 =head1 SYNOPSIS
52  
53 ./script/myapp_create.pl HTML::FormHandler::Scripts
54  
55 =head1 DESCRIPTION
56  
57 This is a Catalyst helper module that builds a
58 L<HTML::FormHandler> form for you, from your L<DBIx::Class> schema,
59 using L<HTML::FormHandler::Model::DBIC>.
60  
61 VERY EARLY CODE: things may yet change, but shouldn't impact older versions
62 (unless you regenerate the script).
63  
64 =head1 DEPENDENCIES
65  
66 The generated script depends on: L<HTML::FormHandler::Generator::DBIC>,
67 L<Config::JFDI>, L<opts>, L<aliased>.
68  
69 =head1 SEE ALSO
70  
71 L<DBIx::Class>, L<HTML::FormHandler>, L<HTML::FormHandler::Model::DBIC>.
72  
73 =head1 AUTHOR
74  
75 Chris Weyl <cweyl@alumni.drew.edu>
76  
77 =head1 COPYRIGHT AND LICENSE
78  
79 This software is Copyright (c) 2011 by Chris Weyl.
80  
81 This is free software, licensed under:
82  
83 The GNU Lesser General Public License, Version 2.1, February 1999
84  
85 =cut
86  
87  
88 __DATA__
↑ Summary