line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package ODS::Table::Column::Email; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
6
|
use YAOO; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
350
|
use ODS::Utils qw/error valid_email/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
extends 'ODS::Table::Column::Base'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub validation { |
10
|
0
|
0
|
0
|
0
|
0
|
|
if (ref($_[1]) || ! valid_email($_[1])) { |
11
|
0
|
|
|
|
|
|
croak sprintf "The value passed to the %s column does not match the email constraint.", |
12
|
|
|
|
|
|
|
$_[0]->name; |
13
|
|
|
|
|
|
|
} |
14
|
0
|
|
|
|
|
|
return $_[1]; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
#sub inflation { return $_[1]; } |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
#sub deflation { return $_[1]; } |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
#sub coercion { return $_[1]; } |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__END__ |