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

I was a happy user of perl on my old MBP under El Capitan. I moved to new MBP which had Sierra on it Everything broken. I installed Perlbrew and the latest Perl. Cpan, cpanm, Spreadsheet::XLSX - went to run my old program - and it crashes with "Parser for XLSX is not installed at live.pl line 50." I tried also installing Spreadsheet::XLSX" - to no effect. Did something change in the last couple of months or is this some Sierra problem? I'm out of things to try. mgg

Replies are listed 'Best First'.
Re: Perl in Sierra
by kcott (Archbishop) on Jan 28, 2017 at 02:07 UTC

    G'day mgg,

    Welcome to the Monastery.

    I installed Sierra (10.12.3) yesterday: "Re: Perl on Sierra (Mac OS X 10.12.x): any issues? [Upgrade completed successfully]". My experience was quite the reverse of "Everything broken.". I'm also using Perlbrew.

    I didn't have Spreadsheet::XLSX installed either (it's not a core module):

    $ perl -Mstrict -Mwarnings -E 'use Spreadsheet::XLSX; say $Spreadsheet +::XLSX::VERSION' Can't locate Spreadsheet/XLSX.pm in @INC (you may need to install the +Spreadsheet::XLSX module) ...

    I installed it without any problems:

    $ cpan ... cpan[1]> install Spreadsheet::XLSX ... MIKEB/Spreadsheet-XLSX-0.15.tar.gz /usr/bin/make install -- OK

    Now, that earlier command works fine:

    $ perl -Mstrict -Mwarnings -E 'use Spreadsheet::XLSX; say $Spreadsheet +::XLSX::VERSION' 0.15

    You need to install any non-core modules that you want to use, for each version of Perl that you install.

    In case you haven't used Perlbrew before: 'perlbrew list' shows you the installed versions; and 'perlbrew switch <perlbrew-perl-version-name>' makes that version your current version.

    You also could have a problem with shebang lines in your scripts. Any that begin with lines like either of these:

    #!/usr/bin/perl ... #!/usr/local/bin/perl ...

    will use one of the system Perls regardless of your current Perl (i.e. the one you switched to with Perlbrew). I start all my scripts like this:

    #!/usr/bin/env perl ...

    That ensures the script always uses the current Perl: there's nothing else to do when you switch between versions.

    — Ken

Re: Parser for XLSX is not installed
by Anonymous Monk on Jan 28, 2017 at 00:12 UTC
Re: Perl in Sierra
by LanX (Saint) on Jan 28, 2017 at 15:34 UTC
    Took me a bit to figure out you are talking about Amiga OS.

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!

    PS: ♪..♫ ... soy capitan! Soy capitán! ... La la Sierra ... ♪..♫