Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>What do you use for building your Perl module? </p> <p>The solution used by Linux kernel and by Git project itself is to replace "++VERSION++" (or "++PROJECT_VERSION++", or "@@PROJECT_VERSION@@") <em>placeholders</em> <strong>by the build system</strong>, in that case by Makefile. (In files in C it is done by defining "PROJECT_VERSION" preprocessor constant, via '<code>-DPROJECT_VERSION=$(PROJECT_VERSION)</code>' option passed to compiler). In your case that would probably be something like <code>Module::Install</code>, <code>Module::Build</code>, or <code>ExtUtils::MakeMaker</code>.</p> <p>Both Git ans Linux kernel uses for that <a href="http://git.kernel.org/?p=git/git.git;a=blob;f=GIT-VERSION-GEN;hb=master" rel="nofollow noreferrer" title="git.kernel.org (gitweb) - git/git.git / blob - GIT-VERSION-GEN">GIT-VERSION-GEN</a> script which:</p> <ol> <li>uses <code>git describe</code> if project is built from within git repository, </li> <li>falls back on <code>version</code> (or <code>VERSION</code>, or <code>GIT-VERSION-FILE</code>) file if build is done from snapshot (this file is created when creating snapshot / archive), </li> <li>and finally falls back on pre-defined version number, which number is updated in commit which marks new released version (e.g. <a href="http://git.kernel.org/?p=git/git.git;a=commitdiff;h=refs/tags/v1.6.4.4#patch3" rel="nofollow noreferrer" title="git.kernel.org (gitweb) - git/git.git / commitdiff - #patch3 (GIT-VERSION-GEN)"><code>cb572206</code></a> commit in git repository, aka commit <code>v1.6.4.4</code>).</li> </ol> <p>I hope that would help you.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload