Skip to content

Instantly share code, notes, and snippets.

@moritz
Created June 8, 2012 09:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moritz/2894632 to your computer and use it in GitHub Desktop.
Save moritz/2894632 to your computer and use it in GitHub Desktop.
Precompiling a module without spawning another rakudo process
use v6;
my $comp := pir::compreg__Ps('perl6');
my $args := nqp::list;
nqp::push($args, 'filename.pl');
nqp::push($args, '--target=pir');
nqp::push($args, '--output=A.pir');
nqp::push($args, 'A.pm');
$comp.command_line($args, :encoding<utf8>);
say 'back to mainline'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment