How do I -MCPAN install and pass commandline params?

How do I -MCPAN install and pass commandline params?

Post by usene » Thu, 08 Mar 2007 03:27:08


I have a module which needs to know the path to a library (which is in
a goofy place on my system). The module's perldocs tell me that I can
stipulate this with a commandline parameter 'libdir=/dir'.

I would prefer to install this module via the CPAN module. If I type
this in a CPAN shell:
install My::Module libdir=/dir

the parameter is silently ignored.

How would I stipulate this parameter within a CPAN install?

Thanks!
 
 
 

How do I -MCPAN install and pass commandline params?

Post by Sherm Pend » Thu, 08 Mar 2007 03:57:18


XXXX@XXXXX.COM writes:


Use the "look" command. I.e.:

look My::Module

This will download the latest version, unpack it, and open up a subshell in
the unpacked build directory. From there you can run "perl Makefile.PL
libdir=/dir" manually. After it's done, you can either run "make; make test;
sudo make install" manually also, or you can exit out of the subshell and
run "install My::Module" to let it handle those steps.

sherm--

--
Web Hosting by West *** ians, for West *** ians: http://www.yqcomputer.com/
Cocoa programming in Perl: http://www.yqcomputer.com/

 
 
 

How do I -MCPAN install and pass commandline params?

Post by usene » Thu, 08 Mar 2007 04:51:26


A smart Perl dude has advised me that I can do this:

o conf makepl_arg libdir=/dir
install My::Module

And it works :)