Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Terminate the execution in default DOC INIT phaser.
This way we behave more like perldoc, and more like the users expect.
  • Loading branch information
Tadeusz Sośnierz committed Apr 22, 2012
1 parent a8f8557 commit 48dd7cd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Perl6/Actions.pm
Expand Up @@ -331,6 +331,17 @@ class Perl6::Actions is HLL::Actions {
:name('&say'), $pod2text,
),
);

# TODO: We should print out $?USAGE too,
# once it's known at compile time

$block.push(
PAST::Op.new(
:pasttype<call>, :node($/),
:name('&exit'),
),
);

$*W.pop_lexpad();
$*W.add_phaser(
$/, 'INIT', make_simple_code_object($block, 'Block')
Expand Down

0 comments on commit 48dd7cd

Please sign in to comment.