Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

why perl doesnt recognize modules after copyied *.pm to paths in @INC

by czkzga (Initiate)
on Nov 29, 2012 at 13:04 UTC ( #1006245=perlquestion: print w/ replies, xml ) Need Help??
czkzga has asked for the wisdom of the Perl Monks concerning the following question:

hi,

tell me what im missing.

i want to install application but it needs to satisfy dependiences. problem is that i can not install other stuff using internet etc this is very important.

i checked that this application have required perl libs within. so i want to extract perl lib from applications, copy to right locations and then install app.

so i copied libs in right dirs (i checked paths to this lib on other machine with the same libs instaled from CPAN) sorry for my english i hope it is understandable.

UPDATE: (list of modules):
Archive::Zip 1.28 or newer
Class::MethodMaker 2.10 or newer
UUID 0.03 or newer
#Data::Dump 1.15 or newer - successfully copied
SOAP::Lite 0.710.08 or newer

UPDATE:
maybe i did not clearly introduce situation, the 2nd machine with access to internet cannot connect to 1st one. i needed 2nd machine to check paths and permissions to these paths. in real situation i will have only 1st machine and i need to have script which extract tar with application copy perl modules and will install app. dependencies are satisfied.

Comment on why perl doesnt recognize modules after copyied *.pm to paths in @INC
Re: why perl doesnt recognize modules after copyied *.pm to paths in @INC
by marto (Chancellor) on Nov 29, 2012 at 13:14 UTC

    There are a few issues here. Not every module can simply be copied into the right place. Some modules have external dependencies (as well as other cpan dependencies) which may not be satisfied. You haven't mentioned which modules you're trying to install.

    My suggestion would be to create a mini CPAN mirror on a system which does have internet access (for example, the one you used to post this question) and transfer it to the system without internet access, and configure cpan accordingly. minicpan makes this easy to do. See also Yes, even you can use CPAN.

      yes that is right, i forgot about list of packages: Archive::Zip 1.28 or newer Class::MethodMaker 2.10 or newer UUID 0.03 or newer #Data::Dump 1.15 - successfully copied SOAP::Lite 0.710.08 or newer

        My advice stands, considering the number of dependant modules and external dependancies, for instance expat for XML::Parser, required by SOAP::Lite.

Re: why perl doesnt recognize modules after copyied *.pm to paths in @INC
by Anonymous Monk on Nov 29, 2012 at 13:21 UTC
Re: why perl doesnt recognize modules after copyied *.pm to paths in @INC
by tobyink (Abbot) on Nov 29, 2012 at 13:46 UTC

    Many Perl modules include compiled components written in XS (a highly pre-processed flavour of C). Just copying across the Perl module (which in these cases is often just a stub to load the XS) is insufficient.

    On a machine with Internet access, download the installation tarballs for the libraries you need (including their dependencies), then copy them to the machine you want them on. Then, making sure you install them in the correct order to satisfy any dependencies), decompress them and run:

    perl Makefile.PL make make test make install

    for each.

    Or, as per marto's suggestion set up a local CPAN mirror. That's probably more initial work, but would pay off in the long term.

    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
      thx, it is important information i will check if modules have xs.
Re: why perl doesnt recognize modules after copyied *.pm to paths in @INC
by Khen1950fx (Canon) on Nov 29, 2012 at 14:42 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1006245]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2014-09-20 07:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (157 votes), past polls