W3C-SOAP
view release on metacpan or search on metacpan
lib/W3C/SOAP/Utils.pm view on Meta::CPAN
# URI's which have a host an a path are converted Java style name spacing
if ( $uri->can('host') ) {
my $module
= join '::',
reverse map { ucfirst $_}
map { lc $_ }
map { s/\W/_/gxms; $_ } ## no critic
split /[.]/xms, $uri->host;
$module .= join '::',
map { s/\W/_/gxms; $_ } ## no critic
split m{/}xms, $uri->path;
return $module;
}
# other URI's are just made safe as a perl module name.
$ns =~ s{://}{::}xms;
$ns =~ s{([^:]:)([^:])}{$1:$2}gxms;
$ns =~ s{[^\w:]+}{_}gxms;
return $ns;
}
( run in 0.779 second using v1.01-cache-2.11-cpan-71847e10f99 )