Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: How to include CPAN packages in distribution package

by halley (Prior)
on Dec 03, 2007 at 20:22 UTC ( [id://654642]=note: print w/replies, xml ) Need Help??


in reply to Re: How to include CPAN packages in distribution package
in thread How to include CPAN packages in distribution package

If you intend to embed modules into your application, your application can use lib to find them in your own private library directory (a part of your application). After use lib, perl will see the updated value of @INC in its search for subsequent use statements.
BEGIN { $INSTALLDIR = my_fun_to_find_my_own_install_dir() } use lib "$INSTALLDIR/privatelib"; use Acme::SuperModule qw(whatever);

The upside is that you have some control over the versions that folks will use, and thus you can more easily guarantee proper execution. The downside to this approach is that the writer of that embedded module (e.g., Acme::SuperModule) might fix a critical bug, and your customers won't get the benefits until you ship them a new version.

--
[ e d @ h a l l e y . c c ]

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://654642]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2024-04-25 19:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found