Parrot::Revision::Utils - Subroutines used in tools/build/revision_c.pl.
use Parrot::Revision::Utils qw( get_revision_numbers print_src_revision_c ); ($current, $config) = get_revision_numbers(); print_src_revision_c($current, $config, $script);
Parrot::Revision::Utils exports on demand two subroutines, get_revision_numbers() and print_src_revision_c() which are used in tools/build/revision_c.pl, a Perl 5 program invoked by Parrot's make program to generate file src/revision.c. That file, in turn, provides C function Parrot_revision().
get_revision_numbers()
print_src_revision_c()
Parrot_revision()
($current, $config) = get_revision_numbers();
Purpose
Provide two Parrot repository revision numbers: the first being the revision number the last time the user made a commit or an update; the second being the revision number at which the user last ran Configure.pl.
Arguments
None.
Return Values
Two-argument list:
current
The Parrot repository revision number at which the user last made a commit or an update.
config
The Parrot repository revision number prevailing when the user last ran Configure.pl.
Comment
If the user follows this sequence:
svn update perl Configure.pl make
... then, the values for current and config at the point at which make invokes tools/build/revision_c.pl will be identical.
If, however, the user follows a sequence like this:
svn update perl Configure.pl # some time passes and the repository revision number increases svn update make
... then, the values for current and config at the point at which make invokes tools/build/revision_c.pl will differ.
print_src_revision_c($current, $config, $0);
Prints the text for src/revision.c.
Three-argument list: current and config as returned by get_revision_numbers() (above) and the name of the current script (typically supplied by $0).
$0
True value.
Output goes to STDOUT. make redirects this to src/revision.c.
STDOUT
The functionality in this package was transferred from tools/build/revision_c.pl by James E Keenan.
lib/Parrot/Revision.pm, tools/build/revision_c.pl.
To install Parrot::Op, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Parrot::Op
CPAN shell
perl -MCPAN -e shell install Parrot::Op
For more information on module installation, please visit the detailed CPAN module installation guide.