[Module-build-general] A portable README generation syntax?
Status: Beta
Brought to you by:
kwilliams
|
From: Mark S. <ma...@su...> - 2003-09-15 01:57:25
|
Hello,
I've noticed that a number of Perl modules have a README file that
repeats the contents of the primary modules documentation in a text
based format. This seems reasonable to me.
[ Puts on thinking cap for a moment. ]. A bit of reflection generated a
couple important thoughts about this:
1. Portability doesn't matter for users in this case, just other
developers who do "Make dist".
2. Here's a syntax that should be portable, using Pod::Text:
use Module::Build;
my $class = Module::Build->subclass(
class => 'CGI::Session::PureSQL::Builder',
code => q{
sub ACTION_dist {
my $self = shift;
use Pod::Text;
my $parser = Pod::Text->new;
$parser->parse_from_file('./lib/CGI/Session/PureSQL.pm', 'README');
$self->SUPER::ACTION_dist;
}
},
);
$class->new(
module_name => 'CGI::Session::PureSQL',
license => 'perl',
)->create_build_script;
####
If this seems like a common and useful thing that people would want to do with
Module::Build, perhaps it could warrant syntax shortcut.
Mark
--
http://mark.stosberg.com/
|