blib/lib/Convert/Base32/Crockford.pm

filter: Statementstmt 100% 21 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 2 / 2 totaltotal 100% 29 / 29 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
↑ Summary
1 1 ▶use strict; use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
2 package Convert::Base32::Crockford;
3 1 our $VERSION = '0.16';
4  
5 1 ▶use Convert::Base32 ();
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use base 'Exporter';
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 our @EXPORT = qw(encode_base32 decode_base32);
9  
10 5 ▶sub encode_base32 {
Subroutine encode_base32: called CC=1 SCAR=0.0
Pod documented
11 5 my $base32 = Convert::Base32::encode_base32($_[0]);
12 5 $base32 =~
13 tr {abcdefghijklmnopqrstuvwxyz234567}
14 {0123456789ABCDEFGHJKMNPQRSTVWXYZ};
15 5 return $base32;
16 }
17  
18 20 ▶sub decode_base32 {
Subroutine decode_base32: called CC=1 SCAR=0.0
Pod documented
19 20 my $string = uc($_[0]);
20 20 $string =~
21 tr {0O1IL23456789ABCDEFGHJKMNPQRSTVWXYZ-}
22 {aabbbcdefghijklmnopqrstuvwxyz234567}d;
23 20 return Convert::Base32::decode_base32($string);
24 }
25  
26 1 1;
↑ Summary