Skip to content

Commit 27101ef

Browse files
committed
add PERL_PLX_BASE env var, allow falsish config value
1 parent ad653ba commit 27101ef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bin/plx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ sub setup_env_for_dir {
175175
}
176176

177177
sub setup_env {
178+
$ENV{PERL_PLX_BASE} = $self->layout_base_dir;
178179
my ($site_libs) = $self->slurp_command(
179180
$self->layout_perl, '-MConfig', '-e',
180181
'print join(",", @Config{qw(sitearch sitelibexp)})'
@@ -501,7 +502,8 @@ sub show_config_libspec {
501502

502503
sub run_named_config_add {
503504
my ($self, $type, $name, $value) = @_;
504-
barf "plx --config ${type} add <name> <value>" unless $name and $value;
505+
barf "plx --config ${type} add <name> <value>"
506+
unless $name and defined($value);
505507
unless (-d (my $dir = $self->layout_config_dir($type))) {
506508
mkdir($dir) or die "Couldn't make config dir ${dir}: $!";
507509
}

0 commit comments

Comments
 (0)