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