in reply to Re^3: trouble with namespace::clean
in thread trouble with namespace::clean

I probably have mixed system perl with CPAN... Can anyone point at a guide on how to properly install and maintain perl (and avoid compatibility issues between CPAN and vendor distros)?

In my case, the system uses perl for dependencies (e.g. munin and nagios) and I add modules not available in the system distro (e.g. yum) via CPAN.

It would be good to have everything relating to the Dancer2 app separate. I would then be able to backup the app and all the perl modules it relies on together.

It isn't obvious to me how to do that though, since @INC contains both cpan and vendor perl and it seems all too easy to mix the two.

Replies are listed 'Best First'.
Re^5: trouble with namespace::clean
by jomo (Acolyte) on May 13, 2016 at 15:01 UTC

    Mixing the OS-installed (vendor installed) modules and the fresh distributed modules could cause problems in any languages environment.

    Therefore myself using the anyenv for all my needs. The installation is straightforward:

    $ git clone https://github.com/riywo/anyenv ~/.anyenv $ echo 'export PATH="$HOME/.anyenv/bin:$PATH"' >> ~/.your_profile $ echo 'eval "$(anyenv init -)"' >> ~/.your_profile $ exec $SHELL -l

    After you got installed the anyenv, you could install many different language environments, like plenv for the perl.

    $ anyenv install plenv

    and now you could install (compile) any perl version what exists in the repository

    $ plenv install -l #to show installable perl versions $ plenv install 5.24.0 #install the 5.24.0 $ plenv global 5.24.0 #set the 5.24.0 as default perl for you

    Read more at plenv github page

    Also, you probably will want to change all #!shebang lines, from

    #!/usr/bin/perl to #!/usr/bin/env perl
Re^5: trouble with namespace::clean
by stevieb (Canon) on May 13, 2016 at 12:43 UTC