Not being happy with the result, I decided to put this into a module which is on CPAN now: Devel::Required.
From the pod:
use ExtUtils::MakeMaker;
eval "use Devel::Required"; # auto-update documentation if needed
WriteMakefile (
NAME => "Your::Module",
VERSION_FROM => "lib/Your/Module.pm",
PREREQ_PM => { 'Foo' => '1.0', 'Bar::Baz' => '0.05' }
);
It takes the information given with the PREREQ_PM parameter and writes this to the README file, as well as to the POD of the file specified with the VERSION_FROM parameter.
This module should only be installed on the system of the developer.
The following files will be changed:
Required Modules: <- must start at beginning of line
<- empty line
<- another empty line
After Makefile.PL is executed (using the example of the SYNOPSIS, the
above will be changed to:
Required Modules: <- must start at beginning of line
Foo (1.0) <- added
Bar::Baz (0.05) <- added
<- empty line
<- another empty line
No changes will be made if the marker text is not found.
=head1 REQUIRED MODULES <- must start at beginning of line
<- empty line
=(anything) <- any other pod directive
After Makefile.PL is executed (using the example of the SYNOPSIS, the above will be changed to:
=head1 REQUIRED MODULES <- must start at beginning of line
<- empty line
Foo (1.0) <- added
Bar::Baz (0.05) <- added
<- empty line
=(anything) <- any other pod directive
No changes will be made if the marker text is not found.
Now only to change of all my modules to use this new feature... ;-)
Liz
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How the CB created another CPAN module: Devel::Required
by castaway (Parson) on Dec 29, 2003 at 07:56 UTC | |
|
Re: How the CB created another CPAN module: Devel::Required
by clscott (Friar) on Dec 29, 2003 at 22:15 UTC | |
by liz (Monsignor) on Dec 29, 2003 at 22:27 UTC |