Re: Module::Build + documenation woes

2009-06-11 Thread Ovid

- Original Message 

 From: Ken Williams kena...@gmail.com
 
 On Tue, May 12, 2009 at 9:06 AM, Eric Wilhelmwrote:
 
  Isn't that what Ken did some time ago?  Ah... 0.31 added
  the create_license = 1 option, but I guess it didn't get documented.
 
 
 Oopsie.  Yeah.
 
 create_license = 1,
 create_readme = 1,
 
 and Bob's your uncle.

I only learned about the 'create_readme' option a few days ago when I was 
browsing the CPAN.

I can't speak for most others, but even though I've done some pretty serious 
things with Module::Build (and I absolutely love it), I'm guessing that my 
common usage ( 95% of the modules I write) matches everyone else's common 
usage:  writing a simple Build.PL

What would be nice if if the main documentation 
(http://search.cpan.org/dist/Module-Build/lib/Module/Build.pm) had, right at 
the top, sample Build.PL code in the synopsis.  After that, maybe a few 
optional configurations or recommended Build.PL files.  For example, here's 
a sample Build.PL that I'm using and the various features are ones that I 
learned from mailing lists because I get lost in the docs :)

  use Module::Build;
 
  my $builder = Module::Build-new(
module_name= 'AI::Logic',
license= 'perl',
dist_author= 'Curtis Ovid Poe o...@cpan.org',
dist_version_from  = 'lib/AI/Logic.pm',
build_requires = { 'Test::Most' = 0.21, },
requires   = { 'Scalar::Util' = 1.19, },
add_to_cleanup = ['AI-Logic-*'],
create_readme  = 1,
create_makefile_pl = 'traditional',
  );
  $builder-create_build_script();

I suspect, but can't prove, that many potential Module::Build users have the 
same issues. They just want to know how to write a useful Build.PL.  Maybe 
after that a quick example of how to extend it to, say, set up a test database 
or some other build action.  Then and only then go into the mind-numbing detail 
about every single bell and whistle that Module::Build provides :)

Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6


Re: Module::Build + documenation woes

2009-06-11 Thread Bill Ward
On Thu, Jun 11, 2009 at 3:46 AM, Ovid
publiustemp-moduleautho...@yahoo.comwrote:


 What would be nice if if the main documentation (
 http://search.cpan.org/dist/Module-Build/lib/Module/Build.pm) had, right
 at the top, sample Build.PL code in the synopsis.  After that, maybe a few
 optional configurations or recommended Build.PL files.  For example,
 here's a sample Build.PL that I'm using and the various features are ones
 that I learned from mailing lists because I get lost in the docs :)
 [...]
 I suspect, but can't prove, that many potential Module::Build users have
 the same issues. They just want to know how to write a useful Build.PL.
  Maybe after that a quick example of how to extend it to, say, set up a test
 database or some other build action.  Then and only then go into the
 mind-numbing detail about every single bell and whistle that Module::Build
 provides :)


+1.

If you really want people to adopt Module::Build, change the h2xs script so
it generates something like the above... (kidding - does anyone still use
h2xs to start a non-xs module?)