Mike Schilli's Friendly Neighborhood Perl Shop

Home
USArundbrief.com
Resume
CPAN Modules
Articles in English
Articles in German
Mike's Script Archive
English-Japanese Translation Trainer
Adventures with O'Reilly's Safari
10 Easy Steps to Become a California Driver
Unofficial perlmonks.com IRC Channel
My Collection of Outage Pages
Prisma (Computer Club Deutschland)
Mike's Monologues
Mike's Script Archive: updreadme

updreadme - Update the README file of a module distribution



NAME

    updreadme - Update the README file of a module distribution


DOWNLOAD

updreadme


SYNOPSIS

    updreadme


DESCRIPTION

Called from the top directory of a module distribution, updreadme will find out what the main *.pm file is, extract the $VERSION from it and create a README file, consisting of a header like

    ##########################################################
    Path::Module VERSION
    ##########################################################

and the result of a pod2text call on the top *.pm file.

It derives the value of VERSION in a somewhat cleaner way than ExtUtils::MakeMaker does (which brute-force parses the module) but makes some pretty wild assumptions:

  • The *.pm file defines one package which contains a global $VERSION variable.

  • The * part of *.pm (the module's file name) equals the last part of the defined package (e.g. if the package is Foo::Bar::Baz, the filename needs to be Baz.pm. It is not necessary that the file is located under Foo/Bar, it can as well reside in the current or any subdirectory.

  • The module doesn't pull in another module which's last name part equals the name of the module. E.g. if the module is Foo::Bar::Baz and it pulls in Blurp::Yada::Baz via use Blurp::Yada::Baz, then we're hosed, because the algorithm will think that it needs to fetch $Blurp::Yada::Baz::VERSION.


REQUIREMENTS

This script depends on the module ModDevUtils.pm, which is freely available from Mike's Script Archive at

    http://perlmeister.com/scripts

Just download it, install it somewhere where perl can find it and updreadme will just work.


LEGALESE

Copyright 2002 by Mike Schilli, all rights reserved. This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.


AUTHOR

2002, Mike Schilli <m@perlmeister.com>


Latest update: 20-Oct-2013