On Sunday, April 21, 2002, at 08:28 , Dan Kogai wrote:
[..]
>
> More elegant solution;
>
> use lib qw(/your/directory);


This is my preferred strategy second ONLY to the idea of
using say h2xs - and creating the obligatory full on
perl module that will be 'installable' - and hence get
on with installing it. { see URI below for my generic
kvetchings. }

Granted this strategy means NOT changing the @INC but
does mean that perl will find your PM in the canonical
CPAN style 'site_perl'....

The 'use lib' strategy has the advantage that it will
'just be there' in the code - and does not require any
modification to the Environment - with PERLLIB, etc....
Hence one does not have to 'tweek' the environment IF
one runs this from cron...

The big advantage of the h2xs and install strategy is
that it moves the developer on down the trail one more
step to providing 're-usable' code - with POD, and
the nearly ubiquitous installer - I say nearly since
I am unsure about it working on win32 architectures
nor under MacClassic - but the solution works well
under solaris, linux, darwin....

At which point the 'applications' derived from the PM
do not need to have 'majik voodoo' associated with it
to mandate that everyone have a

        /home/user/PowerUsers/Moi/lib/perl

installed - nor get into the 'modify application' at
install time work arounds to adjust the 'use lib' line
to point to where the code is installed....

Your mileage may vary,
void where prohibited by law.



ciao
drieux

---
http://www.wetware.com/drieux/CS/lang/Perl/PM/PMbasics.html


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to