line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
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
|
|
|
|
|
|
|
$Catalyst::Helper::HTML::FormHandler::Scripts::VERSION = '0.001'; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# ABSTRACT: Create a script/myapp_hfh.pl to help with forms |
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
1
|
|
35109
|
use namespace::autoclean; |
|
1
|
|
|
|
|
18405
|
|
|
1
|
|
|
|
|
6
|
|
18
|
1
|
|
|
1
|
|
926
|
use common::sense; |
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
6
|
|
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
1
|
|
58
|
use File::Spec; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
172
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub mk_stuff { |
23
|
0
|
|
|
0
|
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
|
|
|
|
|
|
|
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 form for you, from your L schema, |
59
|
|
|
|
|
|
|
using L. |
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, |
67
|
|
|
|
|
|
|
L, L, L. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 SEE ALSO |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
L, L, L. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 AUTHOR |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Chris Weyl |
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__ |