In <[EMAIL PROTECTED]> Yehuda Berlinger wrote:
>  First of all, I may be trying to do the wrong thing, so set me  > 
> straight. I  am having trouble with the installation. I am trying to 
> > decypher  ExtUtils::MakeMaker man pages.
 I strongly suggest 
> printing it out, e.g., from the HTML documentation at search.cpan.org; 
> for me at least, it's way too long to read on screen.  Then use 
> `perldoc ExtUtils::MakeMaker' when you need to search.

I've made a PDF cheat sheet that might help; you can get a copy of it at 
<URL:http://www-personal.umich.edu/~nkuitse/makemaker.pdf> for the next 
few days, and then at <URL:http://www.nkuitse.com/perl/makemaker.pdf>.  
This lists make targets such as manifest, distcheck, testdb, etc. as 
well as the WriteMakefile params I mention below.
 > I am creating a 
distribution for 'Pod/Index.pm' and 'podindex' (a perl  > exe) . >  > My 
directory looks like: >  > Changes > Index.pm.PL > Makefile.PL > 
MANIFEST > Pod/Index.pm.unconfigured > podindex > README > t/1.t >  > I 
want 'podindex' to be installed into $..BIN. Got that. >  > I want Index.
pm.PL to run and create Pod/Index.pm out of  > Pod/Index.pm.unconfigured . 
Got that. Actually what I want is for  > Pod/Index.pm.PL to run to 
create Pod/Index.pm out of  > Pod/Index.pm.unconfigured . How do I do 
that?

(For why I write `lib/Pod/Index.pm' rather than `Pod/Index.pm', 
see below.)

# File 'Makefile.PL' use ExtUtils::MakeMaker; ExtUtils::MakeMaker::
WriteMakefile(
    ...,
    'PL_FILES' => {
        'lib/Pod/Index.pm.
PL' => 'lib/Pod/Index.pm'
    }
)

(To find this information, I used 
`perldoc ExtUtils::MakeMaker' and pressed the `/' key, then entered `.
PL', then hit `n' repeatedly till it got to the part on PL_FILES.)
 > I 
want 'Pod/Index.pm' to be installed into somewhere. Should it go  > into  ...
LIB/*/Pod/Index.pm, ..LIB/site_perl/*/Pod/Index.pm or  ...LIB/ > vendor_
perl/*/Pod/Index.pm ?
 MakeMaker will take care of these details for you.  
Just set up your directory like so:
 Changes Makefile.PL MANIFEST
podindex README lib/
  Pod/
    Index.pm.PL t/
  1.t
 Put something like 
this in Makefile.PL:
 use ExtUtils::MakeMaker; WriteMakefile(
    'NAME'         
=> 'Pod-Index',
    'VERSION_FROM' => 'lib/Pod/Index.pm',  # or .../
Index.pm.PL ??
    'PL_FILES' => {
        'lib/Pod/Index.pm.PL' => 'lib/
Pod/Index.pm'
     },
    'EXE_FILES'    => [ 'podindex' ],
)
 You don't *
have* to use a `lib' directory, but that's how I prefer to do it because 
it reduces the clutter in the top level of the project, especially if 
you have more than one module in your distribution.
 You're using Mac OS 
X, right?  Your module will be installed into /Library/Perl/Pod/Index.pm 
automatically unless you've messed with things.

If in doubt, do `perl Makefile.PL' and then `make -n install' to see 
what will go where.
 Depending on what version of MakeMaker you have, 
`podindex' might be installed into /usr/bin instead of /usr/local/bin (
where it probably belongs), so I recommend installing the most recent 
version of MakeMaker before proceeding.  Module::Build is definitely 
worth a look, too, since MakeMaker is nearing the end of its days.
 > I 
want the pod in podindex and Index.pm.unconfigured to be manified  > 
into  .... uh what? And how would I do that?
 You don't have to do 
anything special; MakeMaker will manify lib/Pod/Index.pm and podindex 
automagically as part of the make process.  (Er, I mean, the Makefile 
that MakeMaker produces will manify yadda yadda.  Or, rather, *make* 
will and so on.)

> Yehuda

Paul.

P.S.: Just in case you don't already know this: on Mac OS X you should 
also include a file MANIFEST.SKIP that includes the following line:

\.DS_Store$

That'll keep those pesky files out of the distribution.  See ExtUtils::
Manifest (which MakeMaker uses) for details.

Reply via email to