# from Ken Williams
# on Wednesday 18 April 2007 06:48 pm:

>What I'd like  
>to do is add an option during 'Build dist' that rewrites all  
>'$VERSION = whatever' assignments to a static version.  Determined  
>through the usual route of dist_version_from or dist_version.

Why in ACTION_dist()?  It seems like a pm_files/ACTION_code() (or just 
ACTION_bumpversion or ACTION_setversion) thing to me.  I guess I expect 
installing from svn and tarball to do the same thing.  I don't mind a 
checkin that's just a version bump (that's pretty typical, isn't it?)

We could probably do it with options, but it seems like that could get 
complicated and stuck-in-compatibility-mode pretty quickly.  Maybe 
start with some pieces like set_version($modpath, $version) and 
match_version($source_modpath, [EMAIL PROTECTED]).  Then see how/if 
people are using it?

Probably need $self->{properties}{version_template} or something too.  
The $version would be a literal string substituted into the #VERSION# 
bit of the template if it is defined, otherwise just a literal.  Or, 
maybe set_version() just takes a literal of everything after the
/^\$VERSION = / and that's it.  We provide a method 
version_from_template($template, $version) to deal with the s///?

--Eric
-- 
Introducing change is like pulling off a bandage: the pain is a memory
almost as soon as you feel it.
--Paul Graham
---------------------------------------------------
    http://scratchcomputing.com
---------------------------------------------------

Reply via email to