Helper/Model/EVDB.pm

filter: Statementstmt 46.6% 7 / 15 Branchbran n/a Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 50.0% 2 / 4 Podpod 100% 2 / 2 totaltotal 36.6% 11 / 30 CC 4 SCAR 24.8
CC
4
Cov
33%
mk_compclass
20.0
mk_comptest
2.0
BEGIN
1.0
CRAP 12.0
↑ Summary Model/EVDB.pm »
1 package Catalyst::Helper::Model::EVDB;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 =head1 NAME
7  
8 Catalyst::Helper::Model::EVDB - Helper for EVDB models
9  
10 =head1 SYNOPSIS
11  
12 script/myapp_create.pl model EVDB EVDB app_key username password
13  
14 =head1 DESCRIPTION
15  
16 Helper for the L<Catalyst> EVDB model.
17  
18 =head1 USAGE
19  
20 When creating a new EVDB model class using this helper, you can
21 specify much of the configuration and have it filled automatically.
22 Using the example from the L</SYNOPSIS> section:
23  
24 =over
25  
26 =item * C<EVDB>
27  
28 The name of the model. This is also used to determine the filename,
29 e.g. C<lib/MyApp/Model/EVDB.pm>.
30  
31 =item * C<EVDB>
32  
33 The helper to use, i.e. this one.
34  
35 =item * C<app_key>
36  
37 Your application key, as provided by EVDB. Please see
38 L<http://api.evdb.com/> to obtain an application key.
39  
40 =item * C<username>
41  
42 (Optional) Your EVDB username.
43  
44 =item * C<password>
45  
46 (Optional) Your EVDB password.
47  
48 =back
49  
50 =head1 METHODS
51  
52 =head2 mk_compclass
53  
54 Makes the EVDB model class.
55  
56 =cut
57  
58 0 ▶sub mk_compclass {
Subroutine mk_compclass: not called CC=4 SCAR=30.0
Pod documented
59 0 my ($self, $helper, $app_key, $username, $password) = @_;
60  
61 0 ▶ $helper->{app_key} = $app_key || '';
Condition0%0/2
$app_key || ''
l!l
00
MC/DC0%0/1
$app_key || ''
$app_key
Truth table0%0/2
A
A= $app_key
Aresult
11
00
62 0 ▶ $helper->{username} = $username || '';
Condition0%0/2
$username || ''
l!l
00
MC/DC0%0/1
$username || ''
$username
Truth table0%0/2
A
A= $username
Aresult
11
00
63 0 ▶ $helper->{password} = $password || '';
Condition0%0/2
$password || ''
l!l
00
MC/DC0%0/1
$password || ''
$password
Truth table0%0/2
A
A= $password
Aresult
11
00
64  
65 0 $helper->render_file('modelclass', $helper->{file});
66  
67 0 return 1;
68 }
69  
70 =head2 mk_comptest
71  
72 Makes tests for the EVDB model.
73  
74 =cut
75  
76 0 ▶sub mk_comptest {
Subroutine mk_comptest: not called CC=1 SCAR=6.9
Pod documented
77 0 my ($self, $helper) = @_;
78  
79 0 $helper->render_file('modeltest', $helper->{test});
80 }
81  
82 =head1 SEE ALSO
83  
84 =over 4
85  
86 =item * L<Catalyst::Manual>
87  
88 =item * L<Catalyst::Test>
89  
90 =item * L<Catalyst::Helper>
91  
92 =back
93  
94 =head1 AUTHOR
95  
96 Daniel Westermann-Clark E<lt>danieltwc@cpan.orgE<gt>
97  
98 =head1 LICENSE
99  
100 This library is free software; you can redistribute it and/or modify
101 it under the same terms as Perl itself.
102  
103 =cut
104  
105 1 1;
106  
107 __DATA__
↑ Summary Model/EVDB.pm »