Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: self containing folder of modules

by moritz (Cardinal)
on Sep 20, 2011 at 08:43 UTC ( [id://926862]=note: print w/replies, xml ) Need Help??


in reply to self containing folder of modules

local::lib does what you want, and the processes of point perl towards the module directory consists of setting the PERL5LIB environment variable (and PATH if the distributions also install scripts), as shown in the SYNOPSIS. The same can be achieved with the -I command line argument.

The other environment variables are only needed for installing the modules/distributions into the right directory, and not necessary for just using the modules.

If you describe where you got stuck, it would be easier to help you.

There are other alternatives, like PAR::Packer and other packers, like cava.

Replies are listed 'Best First'.
Re^2: self containing folder of modules
by micceo (Initiate) on Sep 20, 2011 at 09:05 UTC
    these are the modules i want to use
    use Archive::Tar; #use Authen::Radius; #install Data::hexdumo use bytes; # Do everything in this function by bytes, + not (possibly multibyte) characters. use Carp; use CGI ':standard'; #use CGI for easy web generation use Compress::Zlib; use Config::Tiny; #use Crypt::SSLeay; #install all libraries first use Cwd; use Data::Dumper; #use Device::SerialPort; use Digest::MD5; use DirHandle; use Encode; use enum qw(BITMASK:TYPE_ NUMERIC STRING ARRAY); use Exporter; use Fcntl; use File::Basename; use File::Copy; use File::Find; use FileHandle; use File::Path; use File::Spec (); use Frontier::RPC2; use Getopt::Long; #use Gtk; use HTML::Entities; use HTML::Form; use HTML::PullParser(); use HTML::TokeParser; use HTTP::Cookies; use HTTP::Daemon; use HTTP::Date qw(time2str); use HTTP::Headers; use HTTP::Message; use HTTP::Request; use HTTP::Request::Common; use HTTP::Response; use HTTP::Status; use IO::Dir; use IO::File; use IO::Handle; #use IO::Pty; use IO::Scalar; use IO::Select; use IO::Socket; use IO::Socket::INET; #use IO::Socket::SSL; #use IO::Tty; use IPC::Open2; use IPC::Open3; use IPC::Run::Debug; use IPC::Run qw(run); use IPC::Semaphore; #use IPC::Shareable; #use IPC::Shareable::SharedMem; use IPC::SysV qw(IPC_RMID); use JSON::XS; use List::Util qw(first); use LWP; use LWP::ConnCache; use LWP::MediaTypes qw(guess_media_type); use LWP::UserAgent; use MIME::Base64; use Net::Cmd; use Net::Config; use Net::DNS; use Net::DNS::RR; #use Net::Frame::Layer::TCP; #use Net::Frame::Simple; use Net::FTP; use Net::FTPServer::Full::Server; use Net::MySQL; use Net::Nessus::Client; use NetPacket::Ethernet qw(:strip); use NetPacket::IP; use NetPacket::TCP; use NetPacket::UDP; use Net::Pcap; use Net::Pcap::Reassemble; use Net::Ping; use Net::SMTP; use Net::SNMP; use Net::SNMP::Security::USM; use Net::SNMP::Security::USM v3.0.0; use Net::SOCKS; use Net::SSH::Perl; use Net::SSLeay; use Net::Telnet; use Nmap::Scanner; use PDF::API2; use POE; use POE::Component::Client::TCP; use POE::Driver::SysRW; use POE::Filter; use POE::Filter::Line; use POE::Filter::Stream; use POE::Kernel; use POE::Loop::Event_Lib; use POE::Loop::PerlSignals; use POE::Resources; use POE::Session; use POE::Wheel::FollowTail; use POE::Wheel::ReadWrite; use POE::Wheel::SocketFactory; use POSIX qw(:fcntl_h); use Scalar::Util qw(looks_like_number); use SOAP::Lite; use Socket; use Storable; # for dclone use String::CRC32; use String::Random; use Switch; use Symbol; use Sys::Hostname; use Term::ANSIColor qw(:constants colored); use Text::Balanced (); # core use Text::ParseWords qw(quotewords); use Time::gmtime; use Time::HiRes; use Time::Local; use Tk; # or one of several others use UNIVERSAL (); use URI; use URI::Escape; use utf8; # required for 5.6 #use Win32; #use Win32API::File qw( :ALL ); #use Win32::GuiTest qw(:ALL); #use Win32::OLE; #use Win32::OLE::Const 'Microsoft Excel'; #use Win32::OLE::Const 'Microsoft Outlook'; #use Win32::OLE('in'); #use Win32::OLE::Variant; #use Win32::Process; #use Win32::WinError; use XML::DOM; use XML::SAX; use XML::SAX::Writer; use XML::Simple;
    they may have circular dependencies , so i want to create a folder with all these modules installed , so just make perl pick libraries from that folder. now as there might be dependencies , if i install a module into local folder, the other module might still show dependency error??

      For quick and easy module installation, also see the -L option to cpanm.

        got the local:: lib module installed . i created a dir called mylib in home/ravi

        now i need to add this line to .bashrc
        eval $(perl -I$HOME/mylib/lib/perl5 -Mlocal::lib)
        however the installation of modules is happening in /home/ravi/perl5
        yes , i had mentioned perl Makefile.PL --bootstrap=~/mylib

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://926862]
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-19 15:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found