Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Perl Monk, Perl Meditation
 
PerlMonks  

Re: MakeMaker, h2xs, and writing CPAN modules

by Zaxo (Archbishop)
on Jun 23, 2002 at 19:03 UTC ( [id://176642]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to MakeMaker, h2xs, and writing CPAN modules

The use blib '/path/to'; pragmatic is what you want.

Update: blib.pm will automatically search '..' and above. You need to build your module, but not install it. Then use blib; without any argument works fine from the build directory or any subdirectory of it. If you want to test from another pwd, the argument should be the absolute path to the build directory. Have fun!

After Compline,
Zaxo

Replies are listed 'Best First'.
Re: Re: MakeMaker, h2xs, and writing CPAN modules
by perrin (Chancellor) on Jun 23, 2002 at 19:22 UTC
    Thanks! This works from command-line, but if I make a simple script and try to use it, it fails. Here's an example script:
    #!/usr/bin/perl -w use blib '..';
    And here's the message I get:
    Cannot find blib even in /home/perrin/oscon/../../../../.. BEGIN failed--compilation aborted at ./bench.pl line 3.
      In the usual incantation:
      perl Makefile.PL
      make
      make test
      make install
      
      the build library (blib) is created by the second line make, and is most useful in the third line make test. You cannot use blib before make.

      And if you can't even after that, there is something seriously wrong with your makefile / machine / Perl installation / file system / what not.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://176642]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.