| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Data::Validation::Constants; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
3
|
use strict; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
21
|
|
|
4
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
20
|
|
|
5
|
1
|
|
|
1
|
|
2
|
use parent 'Exporter::Tiny'; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
4
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
405
|
use Data::Validation::Exception; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
192
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our @EXPORT = qw( EXCEPTION_CLASS FALSE HASH NUL SPC TRUE ); |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my $Exception_Class = 'Data::Validation::Exception'; |
|
12
|
|
|
|
|
|
|
|
|
13
|
57
|
|
|
57
|
1
|
214
|
sub EXCEPTION_CLASS () { __PACKAGE__->Exception_Class } |
|
14
|
|
|
|
|
|
|
sub FALSE () { 0 } |
|
15
|
|
|
|
|
|
|
sub HASH () { 'HASH' } |
|
16
|
|
|
|
|
|
|
sub NUL () { q() } |
|
17
|
|
|
|
|
|
|
sub SPC () { q( ) } |
|
18
|
|
|
|
|
|
|
sub TRUE () { 1 } |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub Exception_Class { |
|
21
|
59
|
100
|
|
59
|
1
|
2022
|
my ($self, $class) = @_; defined $class or return $Exception_Class; |
|
|
59
|
|
|
|
|
427
|
|
|
22
|
|
|
|
|
|
|
|
|
23
|
2
|
100
|
|
|
|
27
|
$class->can( 'throw' ) |
|
24
|
|
|
|
|
|
|
or die "Class '${class}' is not loaded or has no 'throw' method"; |
|
25
|
|
|
|
|
|
|
|
|
26
|
1
|
|
|
|
|
5
|
return $Exception_Class = $class; |
|
27
|
|
|
|
|
|
|
} |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__END__ |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=pod |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=encoding utf-8 |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 Name |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Data::Validation::Constants - Defines constants used by this distribution |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 Synopsis |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
use Data::Validation::Constants; |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 Description |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Defines constants used by this distribution |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 Configuration and Environment |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Defines the following attributes; |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=over 3 |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=item C<EXCEPTION_CLASS> |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Class name used to throw exceptions. Defaults to the value of the class |
|
58
|
|
|
|
|
|
|
attribute |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=item C<FALSE> |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
The digit zero |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=item C<HASH> |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
The string C<HASH> |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=item C<NUL> |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
The null string |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=item C<SPC> |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
The space character |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=item C<TRUE> |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
The digit one |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=back |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 Subroutines/Methods |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head2 Exception_Class |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Accessor / mutator for the class attribute |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 Diagnostics |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
None |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 Dependencies |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=over 3 |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=item L<Exporter::Tiny> |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=back |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head1 Incompatibilities |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
There are no known incompatibilities in this module |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head1 Bugs and Limitations |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
There are no known bugs in this module. Please report problems to |
|
107
|
|
|
|
|
|
|
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Data-Validation. |
|
108
|
|
|
|
|
|
|
Patches are welcome |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head1 Acknowledgements |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
Larry Wall - For the Perl programming language |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head1 Author |
|
115
|
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
Peter Flanigan, C<< <pjfl@cpan.org> >> |
|
117
|
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head1 License and Copyright |
|
119
|
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
Copyright (c) 2016 Peter Flanigan. All rights reserved |
|
121
|
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
|
123
|
|
|
|
|
|
|
under the same terms as Perl itself. See L<perlartistic> |
|
124
|
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful, |
|
126
|
|
|
|
|
|
|
but WITHOUT WARRANTY; without even the implied warranty of |
|
127
|
|
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE |
|
128
|
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=cut |
|
130
|
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
# Local Variables: |
|
132
|
|
|
|
|
|
|
# mode: perl |
|
133
|
|
|
|
|
|
|
# tab-width: 3 |
|
134
|
|
|
|
|
|
|
# End: |
|
135
|
|
|
|
|
|
|
# vim: expandtab shiftwidth=3: |