blib/lib/Acme/MetaSyntactic/unicode.pm

filter: Statementstmt 100% 24 / 24 Branchbran 50.0% 3 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 90.9% 30 / 33 CC 1 SCAR 0.0
CC
1
Cov
90%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Acme/MetaSyntactic/olympics.pm ↑ Summary /home/cpancover/.cpan/CPAN/MyConfig.pm »
1 package Acme::MetaSyntactic::unicode;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use Acme::MetaSyntactic::List;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 our @ISA = qw( Acme::MetaSyntactic::List );
5 2 our $VERSION = '1.002';
6  
7 {
8 2 ▶ my $data = do(
Branch: 1 branch
BranchTrueFalseTotal
$] < 5.007003 ? : 0 2 2
9 $] < 5.007003
10 ? 'unicode/Name.pl'
11 : 'unicore/Name.pl'
12 );
13 2 ▶ use feature 'say';
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 # the format of unicore/Name.pl changed in v5.39.10
16 2 ▶ my ( $record_sep, $field_sep) =
Branch: 1 branch
BranchTrueFalseTotal
$] > 5.031009 ? : 2 0 2
17 $] > 5.031009
18 ? ( qr/\n\n/, qr/\n+/ )
19 : ( qr/\n/, qr/\t+/ );
20  
21 # clean up the list
22 2 my %seen;
23 $data = join ' ', grep !$seen{$_}++, # we might have aliases/duplicates
24 71080 map { s/ \(.*\)//; y/- /_/; $_ }
25 71080 grep { $_ ne '<control>' } # what's this for a character name?
26 2 ▶ map { my @F = split /$field_sep/; @F > 2 ? () : $F[1] } # remove blocks
Branch: 1 branch
BranchTrueFalseTotal
@F > 2 ? : 0 71080 71080
27 split /$record_sep/, $data;
28  
29 2 __PACKAGE__->init( { names => $data } );
30 }
31  
32 2 1;
33  
34 __END__
« blib/lib/Acme/MetaSyntactic/olympics.pm ↑ Summary /home/cpancover/.cpan/CPAN/MyConfig.pm »