Where do I install Perl modules that I wrote? -


I have written some modules, and are trying to run them. How do I tell where to take the module?

I am writing in Windows, and tried to put it in c: \ perl \ lib , but it did not help. / P>

Can I put it in the same directory, which tells the file the module?

"post-text" itemprop = "text">

uses paths in perl: to search the module

  @INC  

(.pm files)

If you:

  perl -e 'print add' \ n ", @INC; ' 

You will see which paths are currently searching for the module. (This @incom list has been compiled in Perl executable)

Then you can :

  BEGIN {unshift @INC, 'C: \ mylibs'}  

or

  Lib' C: Use \ mylibs'  

and enable For inside MyModule.pm C: \ mylibs:

  Use MyModule;  

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -