in reply to How can I do with only Standard Perl Distribution
There is another approach you can take. If you can create files in just a single directory you can still use CPAN modules. Adding this code:
BEGIN { unshift @INC,'/home/fred/sc'; }
To the start of your script will allow you to use any Pure Perl CPAN modules (.pm files) that have been copied into the named directory. If the CPAN modules have shared binary libraries (dll or so) then you will need to mess with either $ENV{PATH} or $ENV{LD_LIBRARY_PATH}.
If you can only use a single script file you can still use CPAN modules by appending them to the script (obviously before any data and it is usually best to enclose each "file" in curly braces).
The least good (but still workable) option is to read the CPAN module and "borrow" the routines into your script.
It is almost always a better plan to use CPAN modules rather than attempt to rewrite from scratch
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How can I do with only Standard Perl Distribution
by dragonchild (Archbishop) on Jan 19, 2006 at 14:21 UTC | |
by buysse (Acolyte) on Jan 19, 2006 at 23:26 UTC |