My best guess is that you've installed Active State's ActivePerl. In that case, look for "Perl Package Manager" in perl's installation directory. Installing modules using perl package manager is a piece of cake. It'll even install dependent modules by itself.
This User Gave Thanks to balajesuri For This Post:
Actually what my problem is, I have written few scripts which I need to provide them to my client.Since client is not aware of modules installations and all, he just wants the modules to be installed with a single click(writing all the commands in a single file to run from windows command line).
Perl is working on his system(from the command line) without activeperl.
So I am planning to give him a batch file which installs all the required modules.
One alternative is to have all the required .pm files in a library directory of your perl project and push the path to array @INC. Once this is done, you can use the required module.
For e.g., to use the Net::SSH module, you need to point perl to the location that contains SSH.pm. Copy SSH.pm in, say "c:\myProject\lib". Now in your perl script, before you use Net::SSH, you have to push (@INC, "c:\myProject\lib").
With this approach your client won't have to install any of the modules. And you must ensure that you have all the dependent modules present in the lib directory.
module installed but not able to execute the perl script
Tons of thanks balajesuri...
one small doubt... based on requirement we write some scripts on UNIX and windows environment.
For one specific requirement I have used spreadsheet::xlsx in windows environment and executed the script successfully. After which I copied the same script to remote unix machine.
What the problem is, while trying to execute the script with spreadsheet::xlsx and DateTime::Format::Excel modules I got the below error messages on unix machine.
But our Admin has forwarded the list of modules that are installed on the Unix machine. Surprisingly the above modules were there in the list supplied.
Also attached both the module list taken out by me and admin seperately....
Not sure how to execute the script and how he found the modules list?
I'm not sure if you understood how modules work in perl.
The statement use Spreadsheet::XLSX in perl is crudely similar to java's import com.test.Utilities
Perl -> package::structure::moduleFileName which is similar to
Java -> package.structure.className
The same way as you can find Utilities.class in /path/to/myProj/bin/com/test/Utilities.class; you can find XLSX.pm in /path/to/perl/lib/Spreadsheet/XLSX.pm.
The default paths to search for modules is pre-defined in @INC. If you have XLSX.pm elsewhere, say for e.g., in /home/user/myProj/lib/Spreadsheet/XLSX.pm, you need to tell perl to look in this directory too -> /home/user/myProj/lib.
This can be achieved by push (@INC, "/home/user/myProj/lib"). After which if you say use Spreadsheet::XLSX, you won't see any error.
So when you say use DateTime::Format::Excel, perl is going to look for Excel.pm (DateTime/Format/Excel.pm) inside one of the directories listed in @INC.
Quote:
Originally Posted by giridhar276
Code:
Can't locate DateTime.pm in @INC
.
.
Can't locate spreadsheet/xlx.pm in @INC
I observed two errors in post #5. In your perl code it looks like you gave,
1. use DateTime instead of use DateTime::Format::Excel
2. use spreadsheet::xlx instead of use Spreadsheet::XLSX
Hope this helps.
Last edited by balajesuri; 09-27-2012 at 06:57 AM..
Hi,
I have a task to install a list of perl modules in several servers.
It's very tedious task to install it one by one through CPAN.
Can I have option in CPAN to feed that list so that it install all the modules. (0 Replies)
I have some custom functions which i want to use in perl Scripting all time.
i want to How to create modules in perl and how to import them.
Also if i create 15 modules and i want to > import all at once then how can i import? (0 Replies)
Hi All,
How to install the perl modules in Solaris?
pwd
/eweiquu/ocsta/lib/XML-Simple-2.18
and
bash-3.00# perl Makefile.PL
Checking installed modules ...
XML::Parser is installed, it will be used by the test suite
Writing Makefile for XML::Simple
and then
the readme file says,you... (2 Replies)
Hi All,
I am rather new to the world of Perl programming. I have a question regarding the perl modules. I have a linux box running slackware 12.2 and has perl installed by default there (version 5.10.0) and it has several modules installed namely DBI and DBD::mysql that I wanted to upgrade. ... (2 Replies)
Hi All,
I have a customer asking me to install these perl modules on redhat 4 ent:
File::Temp
Getopt::Long
DBD::mysql
Mail::Mailer
DBD::DB2
Any idea how can I install those modules.
Thanks for any comment you may add. (3 Replies)
Hi. i installed perl 5.8.8.822 in my D: drive(windows xp).When im trying to install IO-Stringy.pm module( or any module for tat matter ) it is getting installed in 'c:\temp\please run installed script' folder no matter from where ever i run the ppm installation.The path variable is set to... (3 Replies)
I'm on Mac OSX, I *think* I succeeded in installing libpng.
I can see usr/local/lib/libpng.dylib and its brethren are in place after executing ./configure nd and the holy make install. (2 Replies)
I resulted to using /usr/sfw/bin/gmake to install my perl modules until i ran into a problem installing perl/Tk Tk-804.028
gmake: Entering directory `/export/home/Tk-804.028/pod'
Sorry no HTML building yet
gmake: Leaving directory `/export/home/Tk-804.028/pod'
I dont unstand what the error... (2 Replies)
Hi,
I am trying to extract the includes from all the perl programs in my application space;ie. i want the list of all used modules in my application.
First i did a grep like 'grep -r "^use.*;$" * > ~dileepp/search.txt' which gives me the output in the form "filename:line containing use"... (0 Replies)
I have a script that uses the File::Listing module. I am trying to install it, but I read the ReadMe and it states that the following modules should be installed first:
URI
MIME-Base64
HTML-Parser
libnet
Digest-MD5
Compress-Zlib
I am very new to Perl and would apprciate anyone's input on... (1 Reply)