Skip to content

Commit

Permalink
Allow for extra config info to be shown from HLL
Browse files Browse the repository at this point in the history
This uses the approach of a dynamic variable that, when called, will
nqp::say whatever it thinks it needs to say as extra config information.

I tried just calling a subroutine: that also works, but spoils the global
namespace even further: a dynamic variable only needs registration in a
hidden hash.  I also tried returning the value, but that results in a
big fail because it somehow warns and there is no warn handler installed,
so it bombs.

Should one change this, then this would also need changing in
src/core/Process.pm .
  • Loading branch information
lizmat committed May 12, 2017
1 parent 9763728 commit 736835d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/HLL/Compiler.nqp
Expand Up @@ -553,6 +553,7 @@ class HLL::Compiler does HLL::Backend::Default {
for %!config {
nqp::say($!language ~ '::' ~ $_.key ~ '=' ~ $_.value);
}
try { self.eval('$*SAY-ADDITIONAL-CONFIG-INFO') }
nqp::exit(0);
}

Expand Down

0 comments on commit 736835d

Please sign in to comment.