line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catalyst::Helper::Model::Filemaker; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
7599
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
42
|
|
4
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
43
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
7
|
use Carp qw( croak ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
326
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Catalyst::Helper::Model::Filemaker - Helper for Filemaker Catalyst models |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 SYNOPSIS |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
script/myapp_create.pl model ModelName Filemaker host=myhost user=myuser \ |
18
|
|
|
|
|
|
|
pass=mypass db=mydb |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 DESCRIPTION |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
Use this module to set up a new L<Catalyst::Model::Filemaker> model for your |
24
|
|
|
|
|
|
|
Catalyst application. |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head2 Arguments |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
ModelName is the short name for the Model class being generated |
29
|
|
|
|
|
|
|
(eg. "Filemaker") |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 METHODS |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head2 mk_compclass |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
This method takes the given arguments and generates a |
36
|
|
|
|
|
|
|
Catalyst::Model::Filemaker model for your application. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=cut |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub mk_compclass { |
41
|
0
|
|
|
0
|
1
|
|
my ( $self, $helper, @options ) = @_; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
# Extract the arguments... |
44
|
0
|
|
|
|
|
|
foreach (@options) { |
45
|
0
|
0
|
|
|
|
|
if (/^host=(.+)$/x) { |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
46
|
0
|
|
|
|
|
|
$helper->{host} = $1; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
elsif (/^user=(.+)$/x) { |
49
|
0
|
|
|
|
|
|
$helper->{user} = $1; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
elsif (/^pass=(.+)$/x) { |
52
|
0
|
|
|
|
|
|
$helper->{pass} = $1; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
elsif (/^pass=(.+)$/x) { |
55
|
0
|
|
|
|
|
|
$helper->{db} = $1; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
0
|
|
0
|
|
|
|
$helper->{config_encountered} = |
60
|
|
|
|
|
|
|
( exists $helper->{host} |
61
|
|
|
|
|
|
|
|| exists $helper->{user} |
62
|
|
|
|
|
|
|
|| exists $helper->{pass} |
63
|
|
|
|
|
|
|
|| exists $helper->{db} ); |
64
|
|
|
|
|
|
|
|
65
|
0
|
|
|
|
|
|
$helper->render_file( 'filemakerclass', $helper->{file} ); |
66
|
0
|
|
|
|
|
|
return; |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 SEE ALSO |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
L<Catalyst>, L<Catalyst::Helper>, L<Catalyst::Model::Filemaker> |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 BUGS |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Please report any bugs or feature requests to |
77
|
|
|
|
|
|
|
C<bug-catalyst-model-filemaker at rt.cpan.org>, or through the web interface |
78
|
|
|
|
|
|
|
at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Catalyst-Model-Filemaker>. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 SUPPORT |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
perldoc Catalyst::Helper::Model::Filemaker |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
You may also look for information at: |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=over 4 |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=item * Catalyst::Model::Filemaker |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
L<https://github.com/micheleo/Catalyst--Model--Filemaker/> |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
L<http://annocpan.org/dist/Catalyst-Model-Filemaker/> |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Catalyst-Model-Filemaker> |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=item * Search CPAN |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
L<http://search.cpan.org/dist/Catalyst-Model-Filemaker/> |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=back |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head1 AUTHOR |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
Michele Ongaro <micheleo@cpan.org> |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
Copyright (c) 2011 Michele Ongaro. All rights reserved. |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
This module is free software; you can redistribute it and/or modify it under |
120
|
|
|
|
|
|
|
the same terms as Perl itself. See L<perlartistic>. |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=cut |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
1; |
125
|
|
|
|
|
|
|
__DATA__ |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=begin pod_to_ignore |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
__filemakerclass__ |
130
|
|
|
|
|
|
|
package [% class %]; |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
use strict; |
133
|
|
|
|
|
|
|
use warnings; |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
use base qw/ Catalyst::Model::Filemaker /; |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
[%- IF config_encountered %] |
138
|
|
|
|
|
|
|
__PACKAGE__->config( |
139
|
|
|
|
|
|
|
[% "host => '" _ host _ "',\n" IF host -%] |
140
|
|
|
|
|
|
|
[% "user => '" _ user _ "',\n" IF user -%] |
141
|
|
|
|
|
|
|
[% "pass => '" _ pass _ "',\n" IF pass -%] |
142
|
|
|
|
|
|
|
[% "db => '" _ db _ "',\n" IF db -%] |
143
|
|
|
|
|
|
|
); |
144
|
|
|
|
|
|
|
[%- END %] |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=head1 NAME |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
[% class %] - Filemaker Model Class |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
=head1 SYNOPSIS |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
See L<[% app %]>. |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
=head1 DESCRIPTION |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
Filemaker Model Class. |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
=head1 AUTHOR |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
[% author %] |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
=head1 LICENSE |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
This module is free software; you can redistribute it and/or modify it under |
170
|
|
|
|
|
|
|
the same terms as Perl itself. See L<perlartistic>. |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
=cut |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
1; |