smokeinabox
view release on metacpan or search on metacpan
cpansmokebox/inc/bundle/File/Spec/OS2.pm view on Meta::CPAN
$directory = $2;
$file = $3;
}
return ($volume,$directory,$file);
}
sub splitdir {
my ($self,$directories) = @_ ;
split m|[\\/]|, $directories, -1;
}
sub catpath {
my ($self,$volume,$directory,$file) = @_;
# If it's UNC, make sure the glue separator is there, reusing
# whatever separator is first in the $volume
$volume .= $1
if ( $volume =~ m@^([\\/])[\\/][^\\/]+[\\/][^\\/]+\Z(?!\n)@s &&
cpansmokebox/inc/bundle/File/Spec/Unix.pm view on Meta::CPAN
$path =~ m|^ ( (?: .* / (?: \.\.?\z )? )? ) ([^/]*) |xs;
$directory = $1;
$file = $2;
}
return ($volume,$directory,$file);
}
sub splitdir {
return split m|/|, $_[1], -1; # Preserve trailing fields
}
sub catpath {
my ($self,$volume,$directory,$file) = @_;
if ( $directory ne '' &&
$file ne '' &&
substr( $directory, -1 ) ne '/' &&
substr( $file, 0, 1 ) ne '/'
( run in 0.443 second using v1.01-cache-2.11-cpan-71847e10f99 )