Cmdr Colstel has asked for the wisdom of the Perl Monks concerning the following question:

Hi Perl Monks,

Can PerlBrew manage non-PerlBrew installations of perl ? I wanted to install ActiveState Perl but have it managed under perlbrew so I can switch it on or off as I please. The ActiveState Mac installer does not give any location options to install other than /usr/local/ActivePerl... . PerlBrew recommends that managed perl installs be located under their perlbrew directory. Any experience or advice on this ? I tried moving the ActiveState folder after install to the perlbrew location but it complained that libraries couldn't be found when I summoned it from perlbrew.

Thanks

  • Comment on Can ActiveState be managed under PerlBrew on Mac

Replies are listed 'Best First'.
Re: Can ActiveState be managed under PerlBrew on Mac
by syphilis (Archbishop) on Sep 28, 2015 at 23:57 UTC
    The ActiveState Mac installer does not give any location options to install other than /usr/local/ActivePerl...

    Are you sure ? I find that simply too appallingly limiting to believe.
    But I don't use Macs.

    It might be worth asking about this on ActiveState's Installation Support forum.
    That would seem the obvious place to check ... but it's not very active, and it looks like you need to have (or create) an account to post there.
    It might therefore not be worth the effort ...

    Cheers,
    Rob
Re: Can ActiveState be managed under PerlBrew on Mac
by Anonymous Monk on Sep 28, 2015 at 23:12 UTC

    ;) Sure, if you extend perlbrew to have that, start with switch_to

    Then later in launch_sub_shell you have

    # The user does not source bashrc/csh in their shell initializ +ation. $env{PATH} = $env{PERLBREW_PATH} . ":" . join ":", grep +{ !/$root\/bin/ } split ":", $ENV{PATH}; $env{MANPATH} = $env{PERLBREW_MANPATH} . ":" . join ":", grep +{ !/$root\/man/ } ( defined($ENV{MANPATH}) ? split(":", $ENV{MANPATH}) : () +);

    Then the other thing to improve is installed_perls

    Basically all these need abstracting

    They should all make use of is_installed or an abstraction like that to generate all paths that need checking

    So that you can add reading paths from a config file in addition to globbing $root

    Basically readdir/glob should only happen in one sub, maybe two, not in 5