Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Don’t Repeat Your… version number

by xdg (Monsignor)
on Jul 21, 2006 at 02:17 UTC ( [id://562759]=note: print w/replies, xml ) Need Help??


in reply to Don’t Repeat Your… version number

Wow. ++ just for figuring all that out.

Personally, I'd worry that depending on parsers to handle the feigned cut is a bit risky.

But, I like the principle of not repeating the version number -- I always used to forget to update the Pod as well as the code. That's why I hacked some simple variable substitution into Pod::WikiDoc:

=begin wikidoc = NAME Pod::WikiDoc - Generate Pod from inline wiki style text = VERSION This documentation refers to version %%VERSION%%. =end wikidoc

I use a custom Build.PL to automatically fill that in when the Pod is pre-processed. (See Pod::WikiDoc::Cookbook).

-xdg

Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Replies are listed 'Best First'.
Re^2: Don’t Repeat Your… version number
by liz (Monsignor) on Jul 23, 2006 at 19:23 UTC
    FWIW, my module Devel::Required takes a similar approach to automatically update version information for required external modules. I guess it could be easily expanded to include the version information of the module itself.

    Liz

      That would be grand. The less boilerplate I need to deploy, the better.

      Makeshifts last the longest.

        Devel::Required 0.07 now on its way to CPAN. It includes support for (assuming your module's version is 1.01) automatically replacing:
        Version:
        with:
        Version: 1.01
        in README type text files, and:
        =head1 VERSION
        with:
        =head1 VERSION This documentation describes version 1.01.
        in pod type files (such as your module's source) each time your run "perl Makefile.PL". The version information is automatically obtained form the generated "Makefile", so it automatically uses any heuristics that ExtUtils::MakeMaker uses. For more information, see the pod of Devel::Required.

        For the people who can't wait until it is replicated all over the world, you can get a copy from my own CPAN directory

        Have fun!

        Liz.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://562759]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (9)
As of 2024-04-19 09:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found