Skip to content

Commit

Permalink
Make nqp::ops warning a bit more camelia friendly
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed May 3, 2015
1 parent 20e3646 commit 86b1b2b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/Perl6/Actions.nqp
Expand Up @@ -392,8 +392,11 @@ class Perl6::Actions is HLL::Actions does STDActions {
my @violations := @*NQP_VIOLATIONS;
if @violations {
my $file := nqp::getlexdyn('$?FILES');
my $text := "===============================================================================
The use of nqp::operations has been deprecated for non-CORE code. Please
my $bar := nqp::gethostname() eq 'ns1'
?? ""
!! '===============================================================================
';
my $text := $bar ~ "The use of nqp::operations has been deprecated for non-CORE code. Please
change your code to not use these non-portable functions. If you really want
to keep using nqp::operations in your Perl6 code, you must add a:
Expand All @@ -415,9 +418,7 @@ Compilation unit '$file' contained the following violations:
~ " Line $line:\n"
~ " nqp::$oplist\n";
}
nqp::printfh(nqp::getstderr(),$text
~ "===============================================================================
");
nqp::printfh(nqp::getstderr(),$text ~ $bar);
}
make $compunit;
}
Expand Down

0 comments on commit 86b1b2b

Please sign in to comment.