Convert-RACE
view release on metacpan or search on metacpan
lib/Convert/RACE.pm view on Meta::CPAN
return $_prefix_tag . $encoded;
}
sub from_race($) {
my $str = lc(shift);
# 2.3.1 Strip the "bq--"
$str =~ s/^$_prefix_tag// or Carp::croak("String not begin with $_prefix_tag");
# 2.3.2 Decode the stripped string with Base32
my $decoded = decode_base32($str);
# 2.3.3 Decompress the decoded string
my $decompressed = _decompress($decoded);
# 2.3.4 Check the internationalized string for disallowed names
unless (_include_disallowed_names($decompressed)) {
Carp::croak('Decoded string includes no internationalized characters');
}
return $decompressed;
}
( run in 0.552 second using v1.01-cache-2.11-cpan-26ccb49234f )