Skip to content

Commit

Permalink
Use lowercase for implicit_current_dir option
Browse files Browse the repository at this point in the history
  • Loading branch information
zmughal committed Oct 15, 2022
1 parent c0c44b2 commit f5d5a31
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/File/Which.pm
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ sub _is_win { my $osname = &_get_osname; ($osname eq 'MSWin32' or $osname eq 'do
sub _is_dos { _is_win(@_); }
sub _is_cyg { my $osname = &_get_osname; ($osname eq 'cygwin' || $osname eq 'msys'); }

sub _default_IMPLICIT_CURRENT_DIR {
sub _default_implicit_current_dir {
my $self = shift;
$self->_is_win || $self->_is_vms || $self->_is_mac;
}
our $IMPLICIT_CURRENT_DIR = do {
File::Which->new->_default_IMPLICIT_CURRENT_DIR;
File::Which->new->_default_implicit_current_dir;
};

sub new {
Expand All @@ -124,10 +124,10 @@ sub new {
osname => $osname,
}, $class;

$self->{IMPLICIT_CURRENT_DIR} =
exists $opts{IMPLICIT_CURRENT_DIR}
? $opts{IMPLICIT_CURRENT_DIR}
: $self->_default_IMPLICIT_CURRENT_DIR;
$self->{implicit_current_dir} =
exists $opts{implicit_current_dir}
? $opts{implicit_current_dir}
: $self->_default_implicit_current_dir;

$self->{PATHEXT} = $self->_default_pathext;

Expand Down Expand Up @@ -178,7 +178,7 @@ sub _default_path {
} else {
@path = File::Spec->path;
}
if ( $self->{IMPLICIT_CURRENT_DIR} ) {
if ( $self->{implicit_current_dir} ) {
unshift @path, File::Spec->curdir;
}
\@path;
Expand Down Expand Up @@ -212,7 +212,7 @@ sub which {
? File::Which->new(
# Use global to retain compatibility, but only for the functional
# interface.
IMPLICIT_CURRENT_DIR => $IMPLICIT_CURRENT_DIR,
implicit_current_dir => $IMPLICIT_CURRENT_DIR,
)
: shift;
my ($exec) = @_;
Expand Down

0 comments on commit f5d5a31

Please sign in to comment.