blib/lib/Net/IDN/IDNA2003.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 10 | 12 | 83.3 |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
41 | 1 | 0 | 25 | $label =~ /^-/ or $label =~ /-$/ |
1 | 3 | 22 | $label =~ /^-/ or $label =~ /-$/ or $label =~ /[\x00-\x2C\x2E-\x2F\x3A-\x40\x5B-\x60\x7B-\x7F]/ | |
52 | 0 | 3 | 28 | length $label < 1 or length $label > 63 |
68 | 9 | 20 | 1 | eval { do { if ($label =~ /[^\x00-\x7F]/) { $label = Net::IDN::Nameprep::nameprep($label, %param); }; my $save3 = $label; croak('Missing IDNA prefix (ToUnicode, step 3)') unless $label =~ s/^$IDNA_prefix//io; $label = Net::IDN::Punycode::decode_punycode($label); my $save6 = to_ascii($label, %param); croak('Invalid label (ToUnicode, step 7)') unless uc $save6 eq uc $save3; $label } } || $orig |