Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: MakeMaker, h2xs, and writing CPAN modules

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


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 23: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
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-04-23 22:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found