Geoffrey/Exception/RequiredValue.pm

filter: Statementstmt 100% 53 / 53 Branchbran 100% 2 / 2 Conditioncond 70.0% 14 / 20 MC/DCmcdc 40.0% 4 / 10 Subroutinesub 100% 21 / 21 Podpod 100% 15 / 15 totaltotal 90.0% 109 / 121 CC 12 SCAR 5.8
CC
12
Cov
92%
throw_table_column
3.1
throw_common
2.1
throw_column_type
2.1
CRAP 1.8
« Geoffrey/Role/Changelog.pm ↑ Summary Geoffrey.pm »
1 package Geoffrey::Exception::RequiredValue;
2  
3 16 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 16 ▶use 5.016;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 16 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 16 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 16 ▶use Carp qw/longmess/;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 16 $Geoffrey::Exception::RequiredValue::VERSION = '0.000206';
10  
11 16 ▶use Exception::Class 1.23 (
Subroutine BEGIN: called CC=1 SCAR=0.0
12 16 'Geoffrey::Exception::RequiredValue' => {description => q~Unidentified exception~,},
13 'Geoffrey::Exception::RequiredValue::TableName' => {description => q~No table name is given!~,},
14 'Geoffrey::Exception::RequiredValue::TriggerName' => {description => q~No trigger name is given!~,},
15 'Geoffrey::Exception::RequiredValue::TableColumn' =>
16 {description => q~No default value set for column in table!~,},
17 'Geoffrey::Exception::RequiredValue::ForeignkeyReftable' =>
18 {description => q~No reftable name is given for foreign key in table!~,},
19 'Geoffrey::Exception::RequiredValue::ForeignkeyRefcolumn' =>
20 {description => q~No refcolumn name is given for foreign key in table!~,},
21 'Geoffrey::Exception::RequiredValue::RefTable' =>
22 {description => 'No reftable name is given for foreign key in table'},
23 'Geoffrey::Exception::RequiredValue::RefColumn' =>
24 {description => q~No refcolumn name is given for foreign key in table!~},
25 'Geoffrey::Exception::RequiredValue::ColumnType' => {description => q~Add column needs is given type name!~},
26 'Geoffrey::Exception::RequiredValue::IndexName' => {description => q~To drop index it needs a name!~},
27 'Geoffrey::Exception::RequiredValue::WhereClause' => {description => q~No where clause is given!~},
28 'Geoffrey::Exception::RequiredValue::Values' => {description => q~No values are given!~},
29 'Geoffrey::Exception::RequiredValue::Converter' => {description => q~No changeset converter is given!~},
30 'Geoffrey::Exception::RequiredValue::ChangesetId' => {description => q~No changeset id is given!~},
31 'Geoffrey::Exception::RequiredValue::ActionSub' => {description => q~Sub couldn't be found in action!~},
32 'Geoffrey::Exception::RequiredValue::PackageName' => {description => q~Package name not given!~},
33 16 );
34  
35 12 ▶sub throw_common {
Subroutine throw_common: called CC=2 SCAR=7.2
Pod documented
36 12 ▶ my $s_value_name = shift // q//;
Condition50%1/2
shift() // ""
l!l
120
MC/DC0%0/1
shift() // ""
shift()
Truth table50%1/2
A
A= shift()
Aresult
11
00
37 12 return Geoffrey::Exception::RequiredValue->throw("$s_value_name is missing!\n" . longmess);
38 }
39  
40 2 ▶sub throw_column_type {
Subroutine throw_column_type: called CC=2 SCAR=7.2
Pod documented
41 2 ▶ my $s_column_name = shift // q//;
Condition50%1/2
shift() // ""
l!l
20
MC/DC0%0/1
shift() // ""
shift()
Truth table50%1/2
A
A= shift()
Aresult
11
00
42 2 return Geoffrey::Exception::RequiredValue::ColumnType->throw(
43 "The column $s_column_name needs is given type!\n" . longmess);
44 }
45  
46 1 ▶sub throw_column_default {
Subroutine throw_column_default: called CC=1 SCAR=0.0
Pod documented
47 1 my ($s_value_name, $s_package) = @_;
48 1 return Geoffrey::Exception::RequiredValue::TableColumn->throw(
49 "No default value set for column $s_value_name in table! $s_package\n" . longmess);
50 }
51  
52 16 ▶sub throw_table_name {
Subroutine throw_table_name: called CC=2 SCAR=6.9
Pod documented
53 16 ▶ my $s_error_value = shift // q//;
Condition100%2/2
shift() // ""
l!l
133
MC/DC100%1/1
shift() // ""
shift()
Truth table100%2/2
A
A= shift()
Aresult
11
00
54 16 return Geoffrey::Exception::RequiredValue::TableName->throw("No table name is given $s_error_value\n" . longmess);
55 }
56  
57 2 ▶sub throw_index_name {
Subroutine throw_index_name: called CC=2 SCAR=6.9
Pod documented
58 2 ▶ my $s_error_value = shift // q//;
Condition100%2/2
shift() // ""
l!l
11
MC/DC100%1/1
shift() // ""
shift()
Truth table100%2/2
A
A= shift()
Aresult
11
00
59 2 return Geoffrey::Exception::RequiredValue::IndexName->throw(
60 "To drop index it needs a name in $s_error_value\n" . longmess);
61 }
62  
63 7 ▶sub throw_trigger_name {
Subroutine throw_trigger_name: called CC=2 SCAR=7.2
Pod documented
64 7 ▶ my $s_error_value = shift // q//;
Condition50%1/2
shift() // ""
l!l
70
MC/DC0%0/1
shift() // ""
shift()
Truth table50%1/2
A
A= shift()
Aresult
11
00
65 7 return Geoffrey::Exception::RequiredValue::TriggerName->throw(
66 "No trigger name is given $s_error_value\n" . longmess);
67 }
68  
69 2 ▶sub throw_reftable_missing {
Subroutine throw_reftable_missing: called CC=2 SCAR=6.9
Pod documented
70 2 ▶ my $s_error_value = shift // q//;
Condition100%2/2
shift() // ""
l!l
11
MC/DC100%1/1
shift() // ""
shift()
Truth table100%2/2
A
A= shift()
Aresult
11
00
71 2 return Geoffrey::Exception::RequiredValue::RefTable->throw(
72 "No reftable name is given for foreign key in table $s_error_value\n" . longmess);
73 }
74  
75 2 ▶sub throw_refcolumn_missing {
Subroutine throw_refcolumn_missing: called CC=2 SCAR=6.9
Pod documented
76 2 ▶ my $s_error_value = shift // q//;
Condition100%2/2
shift() // ""
l!l
11
MC/DC100%1/1
shift() // ""
shift()
Truth table100%2/2
A
A= shift()
Aresult
11
00
77 2 return Geoffrey::Exception::RequiredValue::RefColumn->throw(
78 "No refcolumn name is given for foreign key in table $s_error_value\n" . longmess);
79 }
80  
81 3 ▶sub throw_table_column {
Subroutine throw_table_column: called CC=3 SCAR=11.4
Pod documented
82 3 my ($s_value_name, $s_package) = @_;
83 3 ▶ $s_package //= q//;
Condition50%1/2
$s_package //= ""
l!l
03
MC/DC0%0/1
$s_package //= ""
$s_package
Truth table50%1/2
A
A= $s_package
Aresult
11
00
84 3 ▶ $s_value_name //= q//;
Condition50%1/2
$s_value_name //= ""
l!l
30
MC/DC0%0/1
$s_value_name //= ""
$s_value_name
Truth table50%1/2
A
A= $s_value_name
Aresult
11
00
85 3 return Geoffrey::Exception::RequiredValue::TableColumn->throw(
86 "No table column is given $s_value_name! $s_package\n" . longmess);
87 }
88  
89 2 ▶sub throw_where_clause {
Subroutine throw_where_clause: called CC=2 SCAR=7.2
Pod documented
90 2 ▶ my $s_error_value = shift // q//;
Condition50%1/2
shift() // ""
l!l
20
MC/DC0%0/1
shift() // ""
shift()
Truth table50%1/2
A
A= shift()
Aresult
11
00
91 2 return Geoffrey::Exception::RequiredValue::WhereClause->throw(
92 "No where clause is given $s_error_value\n" . longmess);
93 }
94  
95 1 ▶sub throw_values {
Subroutine throw_values: called CC=1 SCAR=0.0
Pod documented
96 1 my ($s_package) = @_;
97 1 return Geoffrey::Exception::RequiredValue::Values->throw("Values are missing in $s_package !\n" . longmess);
98 }
99  
100 1 ▶sub throw_converter {
Subroutine throw_converter: called CC=1 SCAR=0.0
Pod documented
101 1 my ($s_package) = @_;
102 1 return Geoffrey::Exception::RequiredValue::Converter->throw(
103 "No changeset converter is given! $s_package !\n" . longmess);
104 }
105  
106 2 ▶sub throw_id {
Subroutine throw_id: called CC=2 SCAR=6.9
Pod documented
107 2 my ($s_file) = @_;
108 2 ▶ if ($s_file) {
Branch: 1 branch
BranchTrueFalseTotal
if ($s_file) 1 1 2
109 1 return Geoffrey::Exception::RequiredValue::ChangesetId->throw(
110 "No changeset id is given in file: $s_file!\n" . longmess);
111 }
112 1 return Geoffrey::Exception::RequiredValue::ChangesetId->throw("No changeset id is given!\n" . longmess);
113 }
114  
115 2 ▶sub throw_action_sub {
Subroutine throw_action_sub: called CC=1 SCAR=0.0
Pod documented
116 2 my ($s_action) = @_;
117 2 return Geoffrey::Exception::RequiredValue::ActionSub->throw(
118 qq~No sub name is given for action "$s_action" !\n~ . longmess);
119 }
120  
121 1 ▶sub throw_package_name {
Subroutine throw_package_name: called CC=1 SCAR=0.0
Pod documented
122 1 my ($s_action) = @_;
123 1 return Geoffrey::Exception::RequiredValue::PackageName->throw(
124 qq~No package name is given for action "$s_action" !\n~ . longmess);
125 }
126  
127 16 1;
128  
129 __END__
« Geoffrey/Role/Changelog.pm ↑ Summary Geoffrey.pm »