Lines Matching refs:path
25 sub path {
26 my $path = $ENV{PATH};
27 $path =~ s:\\:/:g;
28 my @path = split(';',$path);
29 foreach (@path) { $_ = '.' if $_ eq '' }
30 return @path;
54 my ($self,$path) = @_;
55 return unless defined $path;
57 $path =~ s/^([a-z]:)/\l$1/s;
58 $path =~ s|\\|/|g;
59 $path =~ s|([^/])/+|$1/|g; # xx////xx -> xx/xx
60 $path =~ s|(/\.)+/|/|g; # xx/././xx -> xx/xx
61 $path =~ s|^(\./)+(?=[^/])||s; # ./xx -> xx
62 $path =~ s|/\Z(?!\n)||
63 unless $path =~ m#^([a-z]:)?/\Z(?!\n)#si;# xx/ -> xx
64 $path =~ s{^/\.\.$}{/}; # /.. -> /
65 1 while $path =~ s{^/\.\.}{}; # /../xx -> /xx
66 return $path;
71 my ($self,$path, $nofile) = @_;
74 $path =~
82 $path =~
135 my($self,$path,$base) = @_;
137 # Clean up $path
138 if ( ! $self->file_name_is_absolute( $path ) ) {
139 $path = $self->rel2abs( $path ) ;
141 $path = $self->canonpath( $path ) ;
154 my ( $path_volume, $path_directories, $path_file ) = $self->splitpath( $path, 1 ) ;
156 return $path unless $path_volume eq $base_volume;
175 # path must ascend out of before it can descend to $path_directory. So,
198 my ($self,$path,$base ) = @_;
200 if ( ! $self->file_name_is_absolute( $path ) ) {
213 ($self->splitpath( $path, 1 ))[1,2] ;
218 $path = $self->catpath(
225 return $self->canonpath( $path ) ;