blib/lib/Encode/Punycode.pm

filter: Statementstmt 93.3% 28 / 30 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 77.7% 7 / 9 Podpod 100% 4 / 4 totaltotal 87.2% 41 / 47 CC 3 SCAR 4.4
CC
3
Cov
88%
encode
2.0
decode
2.0
mime_name
2.0
CRAP 1.6
« Build ↑ Summary
1 package Encode::Punycode;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 2 our $VERSION = '1.001';
8 2 $VERSION = eval $VERSION;
9  
10 2 require Encode;
11 2 ▶use base qw(Encode::Encoding);
Subroutine BEGIN: called CC=1 SCAR=0.0
12 2 __PACKAGE__->Define('Punycode', 'punycode');
13  
14 2 ▶use Net::IDN::Punycode();
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 sub encode {
17 20 ▶ my($self, $string, $check) = @_;
Subroutine encode: called CC=2 SCAR=7.0
Pod documented
18 20 $string = Net::IDN::Punycode::encode_punycode($string);
19 20 ▶ $_[1] = '' if $check;
Branch: 1 branch
BranchTrueFalseTotal
if $check 0 20 20
20 20 return $string;
21 }
22  
23 sub decode {
24 20 ▶ my($self, $string, $check) = @_;
Subroutine decode: called CC=2 SCAR=7.0
Pod documented
25 20 $string = Net::IDN::Punycode::decode_punycode($string);
26 20 ▶ $_[1] = '' if $check;
Branch: 1 branch
BranchTrueFalseTotal
if $check 0 20 20
27 20 return $string;
28 }
29  
30 sub mime_name {
31 0 ▶ return undef;
Subroutine mime_name: not called CC=1 SCAR=6.9
Pod documented
32 };
33  
34 sub perlio_ok {
35 0 ▶ return 0;
Subroutine perlio_ok: not called CC=1 SCAR=6.9
Pod documented
36 }
37  
38 2 1;
39 __END__
« Build ↑ Summary