Converts a relative path to an absolute path.
- $abs_path = $File::Spec->rel2abs( $destination ) ;
- $abs_path = $File::Spec->rel2abs( $destination, $base ) ;
+ $abs_path = File::Spec->rel2abs( $destination ) ;
+ $abs_path = File::Spec->rel2abs( $destination, $base ) ;
If $base is not present or '', then L<cwd()> is used. If $base is relative,
then it is converted to absolute form using L</rel2abs()>. This means that it
Converts a relative path to an absolute path.
- $abs_path = $File::Spec->rel2abs( $destination ) ;
- $abs_path = $File::Spec->rel2abs( $destination, $base ) ;
+ $abs_path = File::Spec->rel2abs( $destination ) ;
+ $abs_path = File::Spec->rel2abs( $destination, $base ) ;
If $base is not present or '', then L<cwd()> is used. If $base is relative,
then it is converted to absolute form using L</rel2abs()>. This means that it
}
# Figure out the effective $base and clean it up.
- if ( ! $self->file_name_is_absolute( $base ) ) {
- $base = $self->rel2abs( $base ) ;
- }
- elsif ( !defined( $base ) || $base eq '' ) {
+ if ( !defined( $base ) || $base eq '' ) {
$base = cwd() ;
}
+ elsif ( ! $self->file_name_is_absolute( $base ) ) {
+ $base = $self->rel2abs( $base ) ;
+ }
else {
$base = $self->canonpath( $base ) ;
}
Converts a relative path to an absolute path.
- $abs_path = $File::Spec->rel2abs( $destination ) ;
- $abs_path = $File::Spec->rel2abs( $destination, $base ) ;
+ $abs_path = File::Spec->rel2abs( $destination ) ;
+ $abs_path = File::Spec->rel2abs( $destination, $base ) ;
If $base is not present or '', then L<cwd()> is used. If $base is relative,
then it is converted to absolute form using L</rel2abs()>. This means that it
if ( ! $self->file_name_is_absolute( $path ) ) {
- if ( ! $self->file_name_is_absolute( $base ) ) {
- $base = $self->rel2abs( $base ) ;
- }
- elsif ( !defined( $base ) || $base eq '' ) {
+ if ( !defined( $base ) || $base eq '' ) {
$base = cwd() ;
}
+ elsif ( ! $self->file_name_is_absolute( $base ) ) {
+ $base = $self->rel2abs( $base ) ;
+ }
else {
$base = $self->canonpath( $base ) ;
}