line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#-*- perl -*- |
2
|
|
|
|
|
|
|
#-*- coding: utf-8 -*- |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Unicode::Precis::Preparation; |
5
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
77458
|
use 5.006001; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
109
|
|
7
|
3
|
|
|
3
|
|
15
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
108
|
|
8
|
3
|
|
|
3
|
|
13
|
use warnings; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
110
|
|
9
|
|
|
|
|
|
|
|
10
|
3
|
|
|
3
|
|
15
|
use base qw(Exporter); |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
621
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( |
13
|
|
|
|
|
|
|
'all' => [ |
14
|
|
|
|
|
|
|
qw(prepare |
15
|
|
|
|
|
|
|
ValidUTF8 FreeFormClass IdentifierClass |
16
|
|
|
|
|
|
|
UNASSIGNED PVALID CONTEXTJ CONTEXTO DISALLOWED) |
17
|
|
|
|
|
|
|
], |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
our @EXPORT_OK = @{$EXPORT_TAGS{'all'}}; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
our $VERSION = '0.000_03'; |
22
|
|
|
|
|
|
|
our $XS_VERSION = $VERSION; |
23
|
|
|
|
|
|
|
$VERSION = eval $VERSION; # see L |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
require XSLoader; |
26
|
|
|
|
|
|
|
XSLoader::load('Unicode::Precis::Preparation', $XS_VERSION); |
27
|
|
|
|
|
|
|
|
28
|
3
|
|
|
3
|
|
256
|
BEGIN { eval 'require Unicode::UCD'; } |
29
|
|
|
|
|
|
|
my $UnicodeVersion; |
30
|
|
|
|
|
|
|
if ($Unicode::UCD::VERSION) { |
31
|
|
|
|
|
|
|
$UnicodeVersion = Unicode::UCD::UnicodeVersion(); |
32
|
|
|
|
|
|
|
} else { |
33
|
|
|
|
|
|
|
# For Perl 5.6.x. |
34
|
|
|
|
|
|
|
$UnicodeVersion = '3.0'; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub prepare { |
38
|
4334
|
|
|
4334
|
1
|
661127
|
my $string = shift; |
39
|
4334
|
|
100
|
|
|
14173
|
my $stringclass = shift || 0; |
40
|
4334
|
|
|
|
|
6793
|
my %options = @_; |
41
|
|
|
|
|
|
|
|
42
|
4334
|
|
66
|
|
|
12775
|
my ($unicode_major, $unicode_minor) = |
43
|
|
|
|
|
|
|
split /[.]/, ($options{UnicodeVersion} || $UnicodeVersion); |
44
|
4334
|
|
100
|
|
|
11487
|
$unicode_minor ||= 0; |
45
|
|
|
|
|
|
|
|
46
|
4334
|
|
|
|
|
23557
|
_prepare($string, $stringclass, ($unicode_major << 4) + $unicode_minor); |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |
50
|
|
|
|
|
|
|
__END__ |