Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: MakeMaker, h2xs, and writing CPAN modules

by Zaxo (Archbishop)
on Jun 23, 2002 at 23:03 UTC ( #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: 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,

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 ./ line 3.
      In the usual incantation:
      perl Makefile.PL
      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?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2020-02-25 17:52 GMT
Find Nodes?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?

    Results (111 votes). Check out past polls.