line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Salvation::TC::Type::Text::English; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
1527
|
use strict; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
120
|
|
4
|
4
|
|
|
4
|
|
13
|
use warnings; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
92
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
15
|
use base 'Salvation::TC::Type::Text'; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
279
|
|
7
|
|
|
|
|
|
|
|
8
|
4
|
|
|
4
|
|
20
|
use Salvation::TC::Exception::WrongType (); |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
751
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
my $re = qr{^[a-z0-9_\-\"\'\,\.\s\/\(\)\@\+\*\:\;\!\#\$\%\^\&\?\[\]\{\}\\]+$}i; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub Check { |
13
|
|
|
|
|
|
|
|
14
|
0
|
|
|
0
|
1
|
|
my ( $class, $value ) = @_; |
15
|
|
|
|
|
|
|
|
16
|
0
|
0
|
|
|
|
|
defined( $value ) || Salvation::TC::Exception::WrongType -> throw( 'type' => 'EnglishText', 'value' => 'UNDEFINED' ); |
17
|
0
|
0
|
|
|
|
|
( $value =~ $re ) || Salvation::TC::Exception::WrongType -> throw( 'type' => 'EnglishText', 'value' => $value ); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
1 |
21
|
|
|
|
|
|
|
__END__ |