Skip to content

Commit

Permalink
Move HLL::Compiler version string out of BUILD and into version() met…
Browse files Browse the repository at this point in the history
…hod. Eliminate $!version attribute.
  • Loading branch information
pmichaud committed May 31, 2011
1 parent 3599a33 commit bc9df6c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/HLL/Compiler.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ class HLL::Compiler {
has $!commandline_prompt;
has @!cmdoptions;
has $!usage;
has $!version;
has $!compiler_progname;
has $!language;
has %!config;
Expand Down Expand Up @@ -63,9 +62,6 @@ class HLL::Compiler {
%r = box .IGLOBALS_CONFIG_HASH
};
%parrot_config := pir::getinterp()[$config_hash_idx];
my $version := %parrot_config<VERSION>;
my $revision := %parrot_config<git_describe> // '(unknown)';
$!version := "This compiler is built with NQP, parrot $version, revision $revision";
%!config := pir::new('Hash');
}

Expand Down Expand Up @@ -575,7 +571,10 @@ class HLL::Compiler {
}

method version() {
pir::say($!version);
my $version := %!config<version>;
my $parver := %parrot_config<VERSION>;
my $parrev := %parrot_config<git_describe> // '(unknown)';
pir::say("This is $!language version $version built on parrot $parver revision $parrev");
pir::exit__vi(0);
}

Expand Down

0 comments on commit bc9df6c

Please sign in to comment.