| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Catalyst::Helper::Model::Proxy; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1429
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
33
|
|
|
4
|
1
|
|
|
1
|
|
6
|
use File::Spec; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
205
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.04'; |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Catalyst::Helper::Model::Proxy - Helper for Proxy Models |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
script/create.pl model Proxy Proxy dsn user password |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
Helper for Proxy Model. |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head2 METHODS |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=over 4 |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=item mk_compclass |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
Reads the database and makes a main model class |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=item mk_comptest |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Makes tests for the Proxy Model. |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=back |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=cut |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub mk_compclass { |
|
37
|
0
|
|
|
0
|
1
|
|
my ( $self, $helper, $target_class, $subroutines ) = @_; |
|
38
|
0
|
|
0
|
|
|
|
$helper->{target_class} = $target_class || ''; |
|
39
|
0
|
|
0
|
|
|
|
$helper->{subroutines} = $subroutines || ''; |
|
40
|
0
|
|
|
|
|
|
my $file = $helper->{file}; |
|
41
|
0
|
|
|
|
|
|
$helper->render_file( 'dbiclass', $file ); |
|
42
|
0
|
|
|
|
|
|
return 1; |
|
43
|
|
|
|
|
|
|
} |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
L<Catalyst::Manual>, L<Catalyst::Test>, L<Catalyst::Request>, |
|
48
|
|
|
|
|
|
|
L<Catalyst::Response>, L<Catalyst::Helper> |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 AUTHOR |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Alex Pavlovic, C<alex.pavlovic@taskforce-1.com> |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 LICENSE |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
This library is free software . You can redistribute it and/or modify |
|
57
|
|
|
|
|
|
|
it under the same terms as perl itself. |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=cut |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |
|
62
|
|
|
|
|
|
|
__DATA__ |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
__dbiclass__ |
|
65
|
|
|
|
|
|
|
package [% class %]; |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
use strict; |
|
68
|
|
|
|
|
|
|
use base 'Catalyst::Model::Proxy'; |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
__PACKAGE__->config( |
|
71
|
|
|
|
|
|
|
target_class => '[% target_class %]', |
|
72
|
|
|
|
|
|
|
subroutines => '[ [% subroutines %] ]' |
|
73
|
|
|
|
|
|
|
); |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 NAME |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
[% class %] - Proxy Model Class |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
See L<[% app %]> |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Proxy Model Class. |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head1 AUTHOR |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
[% author %] |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 LICENSE |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
This library is free software, you can redistribute it and/or modify |
|
94
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=cut |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
1; |