Stow
view release on metacpan or search on metacpan
lib/Stow.pm view on Meta::CPAN
Returns boolean
=cut
sub parent_link_scheduled_for_removal {
my $self = shift;
my ($target_path) = @_;
my $prefix = '';
for my $part (split m{/+}, $target_path) {
$prefix = join_paths($prefix, $part);
debug(5, 4, "| parent_link_scheduled_for_removal($target_path): prefix $prefix");
if (exists $self->{link_task_for}{$prefix} and
$self->{link_task_for}{$prefix}->{action} eq 'remove') {
debug(4, 4, "| parent_link_scheduled_for_removal($target_path): link scheduled for removal");
return 1;
}
}
debug(4, 4, "| parent_link_scheduled_for_removal($target_path): returning false");
lib/Stow.pm.in view on Meta::CPAN
Returns boolean
=cut
sub parent_link_scheduled_for_removal {
my $self = shift;
my ($target_path) = @_;
my $prefix = '';
for my $part (split m{/+}, $target_path) {
$prefix = join_paths($prefix, $part);
debug(5, 4, "| parent_link_scheduled_for_removal($target_path): prefix $prefix");
if (exists $self->{link_task_for}{$prefix} and
$self->{link_task_for}{$prefix}->{action} eq 'remove') {
debug(4, 4, "| parent_link_scheduled_for_removal($target_path): link scheduled for removal");
return 1;
}
}
debug(4, 4, "| parent_link_scheduled_for_removal($target_path): returning false");
lib/Stow/Util.pm view on Meta::CPAN
# Purpose : find the parent of the given path
# Parameters: @path => components of the path
# Returns : returns a path string
# Throws : n/a
# Comments : allows you to send multiple chunks of the path
# : (this feature is currently not used)
#============================================================================
sub parent {
my @path = @_;
my $path = join '/', @_;
my @elts = split m{/+}, $path;
pop @elts;
return join '/', @elts;
}
#===== METHOD ===============================================================
# Name : canon_path
# Purpose : find absolute canonical path of given path
# Parameters: $path
# Returns : absolute canonical path
# Throws : n/a
lib/Stow/Util.pm.in view on Meta::CPAN
# Purpose : find the parent of the given path
# Parameters: @path => components of the path
# Returns : returns a path string
# Throws : n/a
# Comments : allows you to send multiple chunks of the path
# : (this feature is currently not used)
#============================================================================
sub parent {
my @path = @_;
my $path = join '/', @_;
my @elts = split m{/+}, $path;
pop @elts;
return join '/', @elts;
}
#===== METHOD ===============================================================
# Name : canon_path
# Purpose : find absolute canonical path of given path
# Parameters: $path
# Returns : absolute canonical path
# Throws : n/a
( run in 1.243 second using v1.01-cache-2.11-cpan-71847e10f99 )