perl module installation problems... experts advice needed,...


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting perl module installation problems... experts advice needed,...
# 1  
Old 12-08-2005
perl module installation problems... experts advice needed,...

----------
This is perl, v5.6.1 built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)
----------in win 2000 advanced server,..

i am somewhat comfortable with perl but i am new to perl modules..

when i tried to install xml::simple and xml:Smiliearser
there was an error.
----------
what my friend did is :
he created a directory xml inside the lib directoy and he simply copied simple.pm and parser.pm in the xml directory.. and that worked in my machine..
-----------
what i feel is:
"there may be some standard procedures one should follow while installing modules and etc.. even though if we do like copying it might work..but after sometime it may give some problems.."
------------
now i like to know the best practices one should follow while instaling..

thanks in advance...
# 2  
Old 12-08-2005
There are indeed "standard" procedures.

On Unix systems, downloading the tarball, run "perl Makefile.PL" and then "make", "make test", "make install" (mostly as root)is the standard procedure. If there is errors, that usually implies some problems. For instance, for modules that have native (C) parts, that may mean missing 3rd party libraries, incompatibility or if the failure is with the tests, then assuming the tests are well maintained, it is likely to indicate the module may not work on your machine.

You can also use the CPAN module and the "cpan" shell to install modules. Pretty much an automation of the download, extract, compile and install phase. But as it is just using the same tarball, if you have problems with the manual installation you are likely to come into the same kind of problems with this. But most of the time, it is simple and reliable.

A past member has kindly written an introduction here:
https://www.unix.com/tips-and-tutorials/14246-perl-cpan-intro-newbies.html

Windows ActiveState distribution has packaged modules similar to that of CPAN, but not as complete. Use the "ppm" for the interface. If provided, any native components are already compiled so you don't need the compiler (MS VC++ Compiler). If this fails, for non-compiled module you can then copy files as your friend did (it is correct, and I do this too to put custom modules together with my project sources in order to avoid relying on systemwide offerings. But if there are compiled parts, then this trick won't work.Either you need an MS VC++ compiler (because ActiveState Perl is compiled with this compiler), or download mingw and compile Perl from sources with it, and then any custom modules you download.

So in my opinion, Windows is not a good environment for Perl development as there are too many compiled Perl modules nowadays.

Quote:
Originally Posted by sekar sundaram
----------
when i tried to install xml::simple and xml:Smiliearser
there was an error.
What is the error? And how did you install it?

Quote:
"there may be some standard procedures one should follow while installing modules and etc.. even though if we do like copying it might work..but after sometime it may give some problems.."
If you understand how the Perl require mechanism, then you should be pretty comfortable with this. As I said, I seldom install custom modules systemwide (except for compiled ones) to avoid transferring the sources to another machine just to find that the dependencies aren't installed. So simpler modules, it is better to put them locally rather than systemwide, and then set the @INC or 'use lib' to point to where the modules are. Most sophisticated Perl scripts do this. So it's normal.

Last edited by cbkihong; 12-08-2005 at 09:40 AM..
# 3  
Old 12-11-2005
i just refered the link:
http://www.cpan.org/modules/INSTALL.html

but instead of using this..
"If you're running Windows 95 or NT with the ActiveState port of Perl, "

we used:
"If you're running Windows 95 or NT with the core Windows distribution of Perl, "

---i think this may be the error.

in cmd prompt,

as in
"If you're running Windows 95 or NT with the core Windows distribution of Perl, "

------------------
C. BUILD

Go into the newly-created directory and type:

perl Makefile.PL
dmake
dmake test
-----------------

perl makefile.pl was fine... after that only we got error.
# 4  
Old 12-11-2005
xml::simple version problem...

i did ppm in the cmd prompt and in ppm shell

PPM> version
2.2.0
PPM> query
---------
---------
XML-Parser [2.27 ] A Perl module for parsing XML documents
XML-Simple [2.09 ] Easy API to read/write XML (esp config files)
---------

but i downloaded only simple version 2.14
from:
http://search.cpan.org/~grantm/XML-S.../XML/Simple.pm

what happened??... ie how xml-simple[2.09] came in the ppm??
# 5  
Old 12-11-2005
As you can use the "ppm" command, I guess you are actually running the ActiveState Perl already, not a self-compiled perl for Windows.

As I said, unless you have MS VC++ compiler (which most of us here haven't), you need to rely on the ActiveState packages if available, as some modules may need a C compiler to compile. If you don't, it is normal for you to experience errors.

The ActiveState PPM package may be a little bit out of date compared with the CPAN ones, so the fact that they have different versions may be normal too.

You can just type

install <module_name>

in the PPM shell to install a module. An "upgrade" command is also available.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

[Solved] Permission problem, programming advice needed, Perl

Hi all, I have written a wrapper script in Perl which will be used on AIX, Linux and Windows and I do not want to change any code for the needs for a specific OS if avoidable. It works fine so far on all 3 OSes, not blowing up any stacks any more, but I am unsure how to handle writing log files... (7 Replies)
Discussion started by: zaxxon
7 Replies

2. Shell Programming and Scripting

Perl Module Installation issue.

I have issue with the perl module installed in the new Linux server I have installed the required module, but still the perl program was not able to find the path I'm getting the below error: Can't locate Log/Log4perl.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/Log4perl.pm... (5 Replies)
Discussion started by: help_scr_seeker
5 Replies

3. Shell Programming and Scripting

problem during perl module installation

Hi 'm getting error while installing perl mdule on linux.can any one tell me how to resolve that error? problem is: CPAN: File::Temp loaded ok (v0.22) CPAN.pm: Going to build J/JD/JDB/Win32-OLE-0.1709.tar.gz OS unsupported Warning: No success on command Warning (usually harmless):... (1 Reply)
Discussion started by: kavi.mogu
1 Replies

4. Windows & DOS: Issues & Discussions

Strawberry perl - New TK module installation error

Hi, I am struggling in installing TK module for strawberry perl. I downloaded TK804 module, extracted to a folder, kept in c:/strawberry/perl/lib path, then from tht path 1) perl makefile.pl 2)dmake 3)dmake test 4)dmake install During perl makefile.pl it is giving error as... (3 Replies)
Discussion started by: vasanth.vadalur
3 Replies

5. UNIX for Dummies Questions & Answers

Looking for Advice from Experts

Where to start... I am a system administrator who didn't think he would ever be one. My first work was on Window 2000 as a tech(hardware, installs, stuff like that). Then we got Macs (I work in photography and Videography). The I was sent to Mac cert school. Set up a Mac Xserve and about 100... (2 Replies)
Discussion started by: Squidy P
2 Replies

6. Shell Programming and Scripting

Perl Module installation

Hi All, I am failry new to Perl.I am trying to install a Perl module (Filesys::df.pm) in an IBM AIX5.3 server.But I could not succeed in that.I am getting the following error: abcd3dev# make cc_r -c -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias... (6 Replies)
Discussion started by: surjithss
6 Replies

7. UNIX for Advanced & Expert Users

help with perl module installation

Hi, I am trying to install perl modules in HPUX under my account. I do not have the root permission. The module name I am trying to install is Spreadsheet-WriteExcel. I have downloaded the tar.gz file from CPAN and extracted the same under my home directory. When I try do 'perl... (2 Replies)
Discussion started by: sabyasm
2 Replies

8. Shell Programming and Scripting

Help needed in Perl LWP module

Hi, I've a issue in writing a perl script that will automatically monitor the site availability. There are two different cookies are set in two consecutive flows to a URL and this second cookie has to be passed to the third step which actually gives permission to access based upon the cookie. ... (1 Reply)
Discussion started by: dayanandra
1 Replies

9. Programming

Help from lint experts needed

how can i check my code with lint? What if the code containes multiple module? The check is been done on each module separately? What is the command to use the lint Any relevant site??? Thanks a lot. You are doing a great job.:cool: (2 Replies)
Discussion started by: amatsaka
2 Replies
Login or Register to Ask a Question