[OT] Problems preparing a module for CPAN

2000-12-28 Thread Martin Langhoff

hi,

once again, steering off-topic ... :(

I've got a nice little module (Mail::Vmailmgr) I am trying to bundle in
the standard CPAN fashion, so that it has a proper Makefile.PL, etc.

I am following my Perl Cookbook, recipe 12.8 ... steps taken:

% h2xs -AX -n Mail::Vmailmgr
% cd Mail/
% vi Vmailmgr.pm 

and wrote all of my module there, picking what h2xs had prepared.
Now when I follow the next step, it fails:

% make dist
make: *** No rule to make target `dist'.  Stop.

And neither `man perlmod`, `man perlmodlib`, CPAN or O'Reilly's errata
page has any hint ... 

Now many fellow hackers here seem to be releasing successfully to
CPAN... so ... what's the secret? What am I missing? (a neuron or two,
maybe?)


martin



Re: [OT] Problems preparing a module for CPAN

2000-12-28 Thread Michael

 hi,
 
 once again, steering off-topic ... :(
 
 I've got a nice little module (Mail::Vmailmgr) I am trying to bundle
 in the standard CPAN fashion, so that it has a proper Makefile.PL,
 etc.
 
 I am following my Perl Cookbook, recipe 12.8 ... steps taken:
 
 % h2xs -AX -n Mail::Vmailmgr
 % cd Mail/
 % vi Vmailmgr.pm 
 
 and wrote all of my module there, picking what h2xs had prepared.
 Now when I follow the next step, it fails:
 
 % make dist
 make: *** No rule to make target `dist'.  Stop.
 
 And neither `man perlmod`, `man perlmodlib`, CPAN or O'Reilly's
 errata page has any hint ... 
 
 Now many fellow hackers here seem to be releasing successfully to
 CPAN... so ... what's the secret? What am I missing? (a neuron or
 two, maybe?)
 
 
 martin
 

Try 
man perlxs
man xsubpp
man ExtUtils::MakeMaker

for some more documentation.

Quick Start
your Makefile.PL should look something like this for one of my perl 
only modules. It is only slightly different for modules that contain 
C generated stuff.

use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
'NAME'  = 'BZS::Access',
'VERSION_FROM'  = 'Access.pm', # finds $VERSION
'PREREQ_PM' = {'BZS::CryptHash'= '2.04'},
 'dist'  =
   {COMPRESS='gzip', SUFFIX='gz'}
);

Michael
[EMAIL PROTECTED]



Re: [OT] Problems preparing a module for CPAN

2000-12-28 Thread Ken Williams

[EMAIL PROTECTED] (Martin Langhoff) wrote:
% h2xs -AX -n Mail::Vmailmgr
% cd Mail/
% vi Vmailmgr.pm 

and wrote all of my module there, picking what h2xs had prepared.
Now when I follow the next step, it fails:

% make dist
make: *** No rule to make target `dist'.  Stop.

You need to create the makefile (by doing perl Makefile.PL) before you
can start issuing 'make' commands.

The 'dist' target in the makefile is created automatically by your
Makefile.PL.

O, what I wouldn't give for the standard module builder to be based on
Perl and not 'make'.


  ------
  Ken Williams Last Bastion of Euclidity
  [EMAIL PROTECTED]The Math Forum