Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • by Abigail (26) on 2006.07.21 3:05 (#48912) Journal

    It's a cool hack, but I use something else to avoid having to modify the version number twice. I don't modify the version number at all - I let CVS do that for me:

    our ($VERSION) = q $Revision: 1.0$ =~ /[\d.]+/g;

    =head1 VERSION

    $Revision: 1.0$
    The previous line starts with a significant space, but <ecode> decided to ignore it.


    And since I use a template to start a module with, I never have to remember to set the version number.

    Not a cool hack, but something I do use for CPAN modules.

    • The trouble with that is that you're letting CVS control your version numbers. That's not something I'm particularly comfortable with doing.


    • Yeah, over on PerlMonks, David Golden suggested something conceptually very similar, where he uses Pod::WikiDoc [] to handle POD that looks like this:

      =begin wikidoc

      This documentation refers to version %%VERSION%%.

      =end wikidoc

      And then he has a few custom rules in Build.PL as documented in Pod::WikiDoc::Cookbook [], so that Some::Module->VERSION is substituted into place at ./Build dist time.

      I like that approach a little better for the reason Dominic mentioned – I don’t want to leave versio