Pages: Welcome | Projects

PFT versioning

2016/7/28
Tags: [ PFT ]

According to the documentation of ExtTools::Util::FAQ, a good way to handle automatically revisions can be the exploiting the Version Control System for it.

I've learned about git attributes, and they can be used for it as follows:

The trick works really well, but has a huge disadvantage: If the new developer doesn't know about it and didn't set up the filters as in the last step, loading the modules will result in errors (GitVersion is not a valid symbol).

Then, as mentioned by the git attributes (5), there's more complexity involved, possibly resulting in merge conflicts. In fact, the filters are actually intended as convenience, not as requirement:

One use of the content filtering is to massage the content into a shape that is more convenient for the platform, filesystem, and the user to use. For this mode of operation, the key phrase here is "more convenient" and not "turning something unusable into usable". In other words, the intent is that if someone unsets the filter driver definition, or does not have the appropriate filter program, the project should still be usable.

A related discussion on Stack Overflow points me to the ppi_version tool, available in Fedora as perl-PPI-PowerToys. Probably this deserves some investigation.