Helper/Model/DBI.pm

filter: Statementstmt 53.3% 8 / 15 Branchbran n/a Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 66.6% 2 / 3 Podpod 100% 1 / 1 totaltotal 39.2% 11 / 28 CC 4 SCAR 26.1
CC
4
Cov
38%
mk_compclass
20.0
BEGIN
1.0
BEGIN
1.0
CRAP 13.7
« Model/DBI.pm ↑ Summary
1 package Catalyst::Helper::Model::DBI;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use File::Spec;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 our $VERSION = '0.32';
7  
8 =head1 NAME
9  
10 Catalyst::Helper::Model::DBI - Helper for DBI Models
11  
12 =head1 SYNOPSIS
13  
14 script/create.pl model DBI DBI dsn user password
15  
16 =head1 DESCRIPTION
17  
18 Helper for DBI 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 0 ▶sub mk_compclass {
Subroutine mk_compclass: not called CC=4 SCAR=30.0
Pod documented
37 0 my ( $self, $helper, $dsn, $user, $pass ) = @_;
38 0 ▶ $helper->{dsn} = $dsn || '';
Condition0%0/2
$dsn || ''
l!l
00
MC/DC0%0/1
$dsn || ''
$dsn
Truth table0%0/2
A
A= $dsn
Aresult
11
00
39 0 ▶ $helper->{user} = $user || '';
Condition0%0/2
$user || ''
l!l
00
MC/DC0%0/1
$user || ''
$user
Truth table0%0/2
A
A= $user
Aresult
11
00
40 0 ▶ $helper->{pass} = $pass || '';
Condition0%0/2
$pass || ''
l!l
00
MC/DC0%0/1
$pass || ''
$pass
Truth table0%0/2
A
A= $pass
Aresult
11
00
41 0 my $file = $helper->{file};
42 0 $helper->render_file( 'dbiclass', $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 1;
63 __DATA__
« Model/DBI.pm ↑ Summary