Skip to content

Commit

Permalink
make say() and print() redispatch to the methods on $*OUT
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Jun 25, 2011
1 parent 4f8a6d9 commit 348b506
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/core/IO.pm
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
# XXX Relatively cheaty, just to get us able to output something.
# But you should see what USED to be here! O.O
sub print(*@list) {
nqp::print(@list.shift) while @list.gimme(1);
1.Bool
$*OUT.print: @list;
}

sub say(|$) {
my $args := pir::perl6_current_args_rpa__P();
print nqp::shift($args).gist while $args;
print "\n";
$*OUT.say: |pir__perl6_box_rpa__PP(pir::perl6_current_args_rpa__P());
}

sub gist(|$) {
Expand Down
3 changes: 3 additions & 0 deletions src/core/Parcel.pm
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ my class Parcel {
multi method DUMP(Parcel:D:) {
self.DUMP-ID() ~ '(:storage(' ~ DUMP($!storage) ~ '))'
}

method ARGLIST_FLATTENABLE() { $!storage }
}


Expand Down Expand Up @@ -108,3 +110,4 @@ sub pir__perl6_box_rpa__PP(|$) {
sub pir__perl6_unbox_rpa__PP(\$parcel) {
pir::getattribute__PPPs($parcel, Parcel, '$!storage')
}

0 comments on commit 348b506

Please sign in to comment.