Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Can't locate .pm in @INC

by dasgar (Priest)
on Nov 12, 2014 at 06:05 UTC ( [id://1106946]=note: print w/replies, xml ) Need Help??


in reply to Can't locate .pm in @INC

My first instinct would be to upgrade to a newer version of Perl. Not sure why you say that upgrading is not an option, but I won't

One option for you to do is to use App::FatPacker to "pack your dependencies onto your script file". I personally haven't used this module myself. For packing pure Perl modules needed by your script, there shouldn't be a problem. However, I'm not sure how well this module works with packing XS based modules.

Another option would be to use the pp utility from the PAR::Packer module to bundle your script into a stand-alone executable that can be run on another system - even if that system does not have Perl installed.

Since you're already familiar with Strawberry Perl and you can obviously transfer files to the system in question, here's another route that you could go. Download a portable version of Strawberry Perl. To use a version of portable Strawberry Perl, you just run a batch file that opens a new command prompt that has its environment variables set so that you can use the portable Strawberry Perl in just that command prompt. If you use a system with internet access, you can install any modules that you need to from CPAN. Then you can copy all of that plus your script to the system in question.

Replies are listed 'Best First'.
Re^2: Can't locate .pm in @INC
by Anonymous Monk on Nov 12, 2014 at 07:43 UTC

    One option for you to do is to use App::FatPacker to "pack your dependencies onto your script file". I personally haven't used this module myself.

    It comes with a frontend fatpack, it doesn't work on windows (just tried it)... last time I tried it in 2012 it didn't work either ... fatpack doesn't work for windows... not even in 2010

    cpanm comes packed with fatpack and it work well on windows, but fatpack doesn't work for packing stuff on windows

    $ cpanm App::FatPacker App::FatPacker is up to date. (0.010002) $ cat ddenvinc.pl #!/usr/bin/perl -- use strict; use warnings; use Data::Dump; dd(\%INC); dd(\%ENV); $ fatpack trace --to-stderr ddenvinc.pl ddenvinc.pl syntax OK

    Neither strict.pm nor warnings.pm nor Data/Dump.pm are mentioned, it just doesn't work

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-25 07:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found