Ken Williams wrote: > I've been thinking about this slowly for a few months. 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.
I was actually thinking it should be earlier in the process, specifically in copy_if_modified(). This way, any modules that were updated would be "fixed up" before running tests, since this is the place where any incompatibilities should show up. Doing it at dist time is far too late, IMHO. Perhaps the author would provide a list of "subclasses" which would inherit the package $VERSION. The code in lib/ would thus be something like: $VERSION = ##VERSION##; and after copying it to blib/lib, it would be $VERSION = 1.23; assuming the package had a $VERSION of 1.23 (determined in the normal fashion). I deliberately made the "before" code invalid Perl, so that it wouldn't be possible to run it directly out of lib. Perhaps the M::B key could be called "update_version" and be a list of all .pm files that should be updated, or 1 to just mass update any .pm that is present. That way, the package version could actually be specified in the Build.PL and all .pm files would get that propagated during the initial ./Build. The only tricky part to this would be that copy_if_modified() would have to be smarter (since the file *would* be modified during copying); perhaps reset the timestamp after updating the $VERSION line??? John -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4501 Forbes Blvd Suite H Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747