URI-pack
view release on metacpan or search on metacpan
lib/URI/pack.pm view on Meta::CPAN
if ($part_uri !~ m{\A /}msx) {
croak 'A part URI shall start with a forward slash ("/") character [M1.4]';
}
if ($part_uri =~ m{/ \z}msx) {
croak 'A part URI shall not have a forward slash as the last character [M1.5]';
}
# Split the part URI into segments
my @segments = split m{/}msx, $part_uri;
# Remove the first empty segment
if ($segments[0] eq q{}) {
shift @segments;
}
foreach my $segment (@segments) {
if ($segment eq q{}) {
croak 'A part URI shall not have empty segments [M1.3]';
}
( run in 0.723 second using v1.01-cache-2.11-cpan-71847e10f99 )