For Programmers: Free Programming Magazines  


Home > Archive > PERL Modules > March 2005 > 3rd party modules









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author 3rd party modules
qtarokk@gmail.com

2005-03-23, 8:55 pm

I am a beginner in Perl. hope it doesn't sound silly.

If i install a 3rd party module somewhere in @INC, then call it in my
own script. when I run my script on a different machine, do I need to
install that module on the 2nd machine too?

or, should i install the module in my "." directory, so i can just tar
up the whole thing and deploy it on another machine?

thanks in advance.
Paul

Jim Keenan

2005-03-24, 3:56 am

qtarokk@gmail.com wrote:
> I am a beginner in Perl. hope it doesn't sound silly.
>
> If i install a 3rd party module somewhere in @INC, then call it in my
> own script. when I run my script on a different machine, do I need to
> install that module on the 2nd machine too?
>


Read up on @INC in:

perldoc perlvar

The item on @INC is, in my version at least, at approx. line 1278.

If the two machines are entirely unconnected, then, yes, you would have
to install the module on both machines.

If, however, the directory where you loaded the module is on a drive
accessible to both machines, then, no, you would not have to install the
module more than once.

jimk
qtarokk@gmail.com

2005-03-24, 3:56 am

hmm, seems like it work.

I cp the .pm file locally to the same directory as my script, without
installing the module (make Makefile.pl.. etc). Within my script, i
call the module as it suggested, and it works fine.

so i can just tar up the whole directory and deploy it to other
machines.

not sure if this is the conventional way to do it. or any other better
way?

John Bokma

2005-03-24, 3:56 am

wrote:

> I am a beginner in Perl. hope it doesn't sound silly.
>
> If i install a 3rd party module somewhere in @INC, then call it in my
> own script. when I run my script on a different machine, do I need to
> install that module on the 2nd machine too?


Only if it's installed on the 2nd machine

> or, should i install the module in my "." directory, so i can just tar
> up the whole thing and deploy it on another machine?


That's one way to do it.

Also have a look at PAR.

--
John Small Perl scripts: http://johnbokma.com/perl/
Perl programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html

qtarokk@gmail.com

2005-03-24, 3:56 am

hmm, is this why my python friend kept telling me "Perl's hard to
manage"...

guess those 3rd party module were made to run on individual machine,
but not with "massive deployment" in mind?

Paul

John Bokma

2005-03-24, 3:56 am

wrote:

> hmm, is this why my python friend kept telling me "Perl's hard to
> manage"...


Is there a CPAN for Python?

> guess those 3rd party module were made to run on individual machine,
> but not with "massive deployment" in mind?


Again: have a look at PAR: http://par.perl.org/index.cgi (now with link,
apologies for the lack of it the previous time, otoh: google for par
works).

--
John Small Perl scripts: http://johnbokma.com/perl/
Perl programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html

qtarokk@gmail.com

2005-03-25, 8:56 am

great! thanks!

I will try PAR out.

qtarokk@gmail.com

2005-03-30, 3:56 pm

great! thanks!

I will try PAR out.

Jim Keenan

2005-03-31, 3:57 am

qtarokk@gmail.com wrote:
> I am a beginner in Perl. hope it doesn't sound silly.
>
> If i install a 3rd party module somewhere in @INC, then call it in my
> own script. when I run my script on a different machine, do I need to
> install that module on the 2nd machine too?
>


Read up on @INC in:

perldoc perlvar

The item on @INC is, in my version at least, at approx. line 1278.

If the two machines are entirely unconnected, then, yes, you would have
to install the module on both machines.

If, however, the directory where you loaded the module is on a drive
accessible to both machines, then, no, you would not have to install the
module more than once.

jimk
John Bokma

2005-03-31, 3:57 am

wrote:

> I am a beginner in Perl. hope it doesn't sound silly.
>
> If i install a 3rd party module somewhere in @INC, then call it in my
> own script. when I run my script on a different machine, do I need to
> install that module on the 2nd machine too?


Only if it's installed on the 2nd machine

> or, should i install the module in my "." directory, so i can just tar
> up the whole thing and deploy it on another machine?


That's one way to do it.

Also have a look at PAR.

--
John Small Perl scripts: http://johnbokma.com/perl/
Perl programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html

John Bokma

2005-03-31, 3:57 am

wrote:

> hmm, is this why my python friend kept telling me "Perl's hard to
> manage"...


Is there a CPAN for Python?

> guess those 3rd party module were made to run on individual machine,
> but not with "massive deployment" in mind?


Again: have a look at PAR: http://par.perl.org/index.cgi (now with link,
apologies for the lack of it the previous time, otoh: google for par
works).

--
John Small Perl scripts: http://johnbokma.com/perl/
Perl programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com