# New Ticket Created by Ira Byerly
# Please include the string: [perl #73418]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=73418 >
Hello,
Thanks to pmichaud++ and masak++ for pointing me in the right direction
structuring this patch to match the existing architecture (#perl6,
08:41-09:20 UTC 2010-03-02.)
******
I noticed that perl6 -v (--version) doesn't currently say very much, and the
differences in output between different version of Rakudo appear to be
mostly accidental. For example, here is perl6 -v from Alpha (just before the
-ng merge) and Amsterdam (just after.)
$ alpha -v
This is Rakudo Perl 6.
Copyright 2006-2010, The Perl Foundation.
$ amsterdam -v
This compiler is built with the Parrot Compiler Toolkit, parrot revision
44147.
There is an existing Perl6 bug report from August 2009 on the same topic,
"#68752: perl6 --version doesn't actually give version info".
The attached patch changes the output from Amsterdam's format to this:
$ perl6 --version
This is a development version of Rakudo Perl 6. It is based on the
"rakudo-ng" development branch and is expected to evolve into
development release #27 "Copenhagen" about March 18, 2010.
It was built Sun Mar 7 16:34:40 HST 2010 by quester on f12.virt
It is from the git branch "master"
commit 1cc1f3c4e4a9f736c3077532dfec79721b581fbc
Author: quester <[email protected]>
Date: Sun Mar 7 15:43:30 2010 -1000
Rakudo Perl 6 is Copyright (C) 2008-2010, The Perl Foundation.
This compiler is built with the Parrot Compiler Toolkit, parrot revision
44705.
All of the new perl6 -v information is built as static PIR say "..."
statements that are written into src/gen/version-cheats.pir during the make
process by a Perl 5 script, build/gen_version_pir.pl. The say statements are
in a copy of the method "version" that I swiped from
parrot/compilers/pct/src/PCT/HLLCompiler.pir.
The first three lines of perl6 --version output above are in a string
constant in build/gen_version_pir.pl, which would be filled in by hand
during the process of making the tarball for a new release. It would remain
as is until the tarball for 2010-03 is built, at which point it would be
changed to read something like:
This is Rakudo Perl 6, development release #27 "Copenhagen"
released on March 18, 2010.
The next git commit sent after the tarball is created needs another manual
change switch back to labelling the release as a development version, rather
than development release. Users who want to know which development version
is which could use the git information.
The next line is taken from environment variables (host and user name) and
either /bin/date, if that works, or from localtime.
The next four lines are taken from git branch and git show, which are run
during the make. If there is no .git directory present or the git commands
fail, those lines will be omitted from the output of perl6 -v.
The copyright line is another string constant built into build/
gen_version_pir.pl, except for the ending year, 2010 in the example, which
is taken from the year of the commit in git show. This is a quick attempt to
get around the problem of a developer who might forget to bump the copyright
statement on the compiler itself each year.
The last line of output is supplied by PCT.
Best regards,
Ira Kevin Byerly
quester (on #perl6 and perlmonks)
quester.pm { at } gmail.com