Stories
Slash Boxes
Comments
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.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • 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.

    =cut

    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.

      -Dom

    • Yeah, over on PerlMonks, David Golden suggested something conceptually very similar, where he uses Pod::WikiDoc [cpan.org] 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 [cpan.org], 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

  • Have you tested this hack with Module::Build?