Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: using perl plug-ins

by arcnon (Monk)
on Feb 19, 2006 at 15:06 UTC ( [id://531257]=note: print w/replies, xml ) Need Help??


in reply to using perl plug-ins

think of it like so..... your directory structure
home ........your home dir test.pl ........the script your running Plug-Ins ........the folder you made Find.pm ........the module you added More ........and another folder More.pm....and another module
in test.pl
use Plug-Ins::Find; use Plug-Ins::More::More;
If the module is not installed think of 'use' as the path to where the module you want to use is located.. This is useful only in a descending folder structure.

Replies are listed 'Best First'.
Re^2: using perl plug-ins
by fishbot_v2 (Chaplain) on Feb 19, 2006 at 15:20 UTC

    If you do something like this, remember that Plug-Ins is not a valid package name. Also, remember that the file that you use has to think that it is defining a package called "Plugin::Find", not just "Find". The file will be required, but the package will not be import()ed, unless the OP edits his modules to use the new qualified package name.

    This solution also assumes that "." (the CWD) is in the OP @INC, and that the OP will only ever run it from that directory.

    The best solution is just to use lib, though, with a full qualified path:

    use lib '/some/dir/Plug-Ins/'; use Find;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-04-25 12:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found