in reply to Re^2: Perl/SVN/versioning - ideas?
in thread Perl/SVN/versioning - ideas?

Then install a post-commit hook that writes the revision into a special file, and read that for determining the revision.

But be careful when you do releases, it might be better to hardcode the version in the .pl and .pm files in released versions of your app.

Replies are listed 'Best First'.
Re^4: Perl/SVN/versioning - ideas?
by ikegami (Patriarch) on Aug 02, 2011 at 18:12 UTC

    Then install a post-commit hook that writes the revision into a special file, and read that for determining the revision.

    If the file looks like:

    package Project::Version; use strict; use warnings; use Exporter qw( import ); our @EXPORT = qw( $VERSION ); our $VERSION = ...; 1;

    Then use Project::Version; will import $VERSION into the caller.