Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fresh install complains about 'Use of uninitialized value in split at /loader/0x1e6b690/local/lib.pm line 8.' #235

Open
ravenoak opened this Issue · 19 comments
@ravenoak

I am not using local::lib and do not plan on doing so at this time. How can I disable this message from coming up on new shells without hacking all of that out of PERLBREW?

@lgw4

It says Use of uninitialized value in split at /loader/0x7fd43a0515b0/local/lib.pm line 8 on my install. Any suggestions on how to disable this message?

@gugod
Owner

This looks like it should be fixed in perlbrew.pm. Can you both describe more on how to reproduce this warning message ? Like, dose it happen when you install perlbrew, or does it happen when you run certain command ?

@lgw4

This happens every time I start a new shell and the perlbrew initialization code is sourced by my ${HOME}/.bashrc file.

@riywo

I got same message. I checked git clone & exec.

$ PERL5OPT="-Mlib=./extlib/lib/perl5" perl -I./lib bin/perlbrew env
Use of uninitialized value in split at extlib/lib/perl5/local/lib.pm line 456.
export PERLBREW_PERL=""
export PERLBREW_VERSION="0.50"
unset PERL_MB_OPT
unset PERL_LOCAL_LIB_ROOT
unset PERL_MM_OPT
unset PERL5LIB
export PATH="..."
export PERLBREW_MANPATH=""
export PERLBREW_LIB=""
export PERLBREW_PATH="/home/riywo/perl5/perlbrew/bin"
export PERLBREW_ROOT="/home/riywo/perl5/perlbrew"
@emptyflask

Same here. I just installed using curl, and get:

Use of uninitialized value in split at /loader/0x7ffb418523f8/local/lib.pm line 8.
@gnoling

This seems to happen to me as well, but only when perlbrew is switched off. If I switch to a perlbrew perl install, the error goes away.

@moortz

It seems to occur when $ENV{PERL5LIB} is undefined.
Inside "perlbrew env", local::lib::build_deactivate_environment_vars_for tries to split $ENV{PERL5LIB}, and it warns.

When any perlbrew perl is in use, $ENV{PERL5LIB} is set and no warning occurs.
Otherwise, you can workaround this with below.

if [[ -z "$PERL5LIB" ]]; then export PERL5LIB=""; fi
source ${PERLBREW_ROOT}/etc/bashrc # and no warning
@gugod
Owner

9f15064 fixed one part of this issue.

@jspc

There is an open pull request to fix this at #236

@phildobbin

I too get:

Use of uninitialized value in split at /loader/0x7ffb418523f8/local/lib.pm line 8

every time my bashrc is sourced (this on CentOS 6.3 fresh install of perlbrew via curl a couple of hours ago...

@pamag

I have had the same problem with a fresh install with install.perlbrew.pl and it was solved initializing $PERL5LIB in my .bashrc

@nmani

I'm using 0.54 and still encountering this error:

$ perlbrew switch perl-5.16.1
Use of uninitialized value in split at /loader/0x17428c8/App/perlbrew.pm line 34.

@bockscar

Same error here.

@abh

I get this error with 0.62, too.

PERL5LIB is set, for what it's worth.

[ntpbeta@ntplax4 ~]$ source /opt/perlbrew/etc/bashrc 
Use of uninitialized value in split at /loader/0x9ef3768/local/lib.pm line 8.
[ntpbeta@ntplax4 ~]$ perlbrew env
export PATH="/opt/perlbrew/bin:/opt/perlbrew/perls/perl-5.16.3/bin:/usr/lib/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/go/bin:/home/ntpbeta/go/bin:/home/ntpbeta/bin:/home/ntpbeta/ntppool/bin:/home/ntpbeta/ntppool/combust/bin:/home/ntpbeta/ntppool/cpan/bin"
export PERL5LIB="/home/ntpbeta/.perlbrew/libs/perl-5.16.3@ntppool-1/lib/perl5/i686-linux"
unset PERLBREW_LIB
export PERLBREW_MANPATH=""
export PERLBREW_PATH="/opt/perlbrew/bin"
unset PERLBREW_PERL
export PERLBREW_ROOT="/opt/perlbrew"
export PERLBREW_VERSION="0.62"
unset PERL_LOCAL_LIB_ROOT
unset PERL_MB_OPT
unset PERL_MM_OPT
@abh

I think explicitly setting PERL_LOCAL_LIB_ROOT="" in my ~/.perlbrew/init file fixed it.

@steve3141

I have similar problem with fresh install, happens on any invocation of perlbrew as well as the initial sourcing of the perlbrew bashrc, although the exact hex address under /loader/ varies. For example:

$ perlbrew help
Use of uninitialized value in scalar assignment at /loader/0x1ba89870/App/perlbrew.pm line 1.
##... followed by expected help text output

Things seem to work but it's disconcerting since I don't know whether something is in fact broken.

@bor

For me it happens when I try 'self-upgrade'

$ perlbrew self-upgrade
Use of uninitialized value in scalar assignment at /loader/0x1f00c450/App/perlbrew.pm line 1.
Your perlbrew is up-to-date.
@grtodd

I think I can confirm what moortz said in one of the earlier comments. This happens for me with a fresh perlbrew install if I select a version to use:

~/ % perl5/perlbrew/bin/perlbrew use perl-5.18.0        
Use of uninitialized value in split at /loader/0x8018264c8/App/perlbrew.pm line 34.

A sub-shell is launched with perl-5.18.0 as the activated perl. Run 'exit' to finish it.

localhost%

But if I select a brewed_perl-version@mybrewledlocallib as my target brewed environment, then the the message goes away - I guess since the split is not happening in the same way.

~/ % perl5/perlbrew/bin/perlbrew list       
  perl-5.18.0
  perl-5.18.0@mytests
localhost % perl5/perlbrew/bin/perlbrew use perl-5.18.0@mytests

A sub-shell is launched with perl-5.18.0@mytests as the activated perl. Run 'exit' to finish it.

localhost%
@ingydotnet

I get the warning and the sub-shell msg when using the switch command; only when I have not previously sourced the perlbrew bashrc.

In other words, if I source the perlbrew bashrc when the shell starts, there is no problem.

The code should probably detect this situation and suggest the easy fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.