Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Perlbrew PAR

by kcott (Archbishop)
on Apr 07, 2018 at 05:12 UTC ( [id://1212477]=note: print w/replies, xml ) Need Help??


in reply to Perlbrew PAR

[Disclaimer: I have the same Mac system as you (running Perlbrew) but it's ~300 miles away from where I'm currently sitting. What follows is entirely from memory: I encourage you to check the information first rather than following blindly.]

Check $PATH. If Perlbrew has been set up correctly, you should have this order:

...:/Users/rl/perl5/perlbrew/perls/perl-5.16.3/bin/:...:/usr/bin/:...

If not, you may need to do something with ${PERLBREW_ROOT}/etc/bashrc, such as sourcing from .bashrc, see perlbrew (and in particular, its CONFIGURATION section) for details.

You should also check that perlbrew is switched to the correct Perl version. I'd typically use list for that:

$ perlbrew list ... * perl-5.16.3 ...

Assuming you're all set up correctly, then what you're describing suggests that you haven't installed PAR::Packer under your 5.16.3 version of Perl. See if pp exists in /Users/rl/perl5/perlbrew/perls/perl-5.16.3/bin/.

In case you weren't aware, pp used to be part of PAR, but is no longer. From the start of its documentation:

"pp used to be part of the PAR distribution but is now shipped as part of the PAR::Packer distribution instead."

You may simply have installed PAR thinking that gave you pp, as it used to.

If that doesn't help, please post the output from the suggested checks and show us the installation steps you took. With that information, we can probably aid you further (if required).

— Ken

Replies are listed 'Best First'.
Re^2: Perlbrew PAR
by Anonymous Monk on Apr 08, 2018 at 08:05 UTC

    Thank you Ken

    As far I can see, it seems everything is set the right way on my machine. However the problem persists. Here a couple of more info.

    pp exists in /Users/rl/perl5/perlbrew/perls/perl-5.16.3/bin/

    $PATH -> /Users/rl/perl5/perlbrew/bin:/Users/rl/perl5/perlbrew/perls/p +erl-5.16.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/ +bin $ perlbrew list -> * perl-5.16.3

    If I try: pp -o TEST writeFile.pl (simple script to write to file), I get everything packed right. However, if I try pp -M Tk -o TEST2 TKbasic.pl (where I have a simple Tk code), I get the error: /usr/bin/pp5.18: Cannot find module Tk.pm (specified with -M). Which I interpret (maybe I am wrong) so that I am using a PP I may have mistakenly installed in the past with the default Perl. In any case Tk is installed in my perl-5.16.3 as I can run the .pl script without problems.

    Any suggestion?

      Maybe it is working correctly, but something is pointing the module search to your 5.18 installation? Do you have PERL5LIB set in your environment?

      What happens if you use the full path to pp? And specify the full path to perl?

      /Users/rl/perl5/perlbrew/perls/perl-5.16.3/bin/perl /Users/rl/perl5/pe +rlbrew/perls/perl-5.16.3/bin/pp.pl -M Tk -o TEST2 TKbasic.pl

      Another thing to check is to use scandeps.pl to see where pp is looking for modules.

      scandeps -B -V TKbasic.pl

      Or even pp with the verbose option (use -vvv for maximum verbosity).

      pp -v -M Tk -o TEST2 TKbasic.pl

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1212477]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-04-26 03:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found