I didn't phrase that quite right.
pyanfar Z$ 6 'my @lines; $*OUT.^find_method("print").wrap: -> $self, $str {
@lines.push($str) }; use Test; note "hello"; is @lines[0], "hello\n",
"wrapped err too"'
ok 1 - wrapped err too
This wraps it for every IO::Handle, not just for the IO::Handle in $*OUT.
On Thursday, October 25, Brandon Allbery wrote:
> You can't actually wrap print that way, can you? Or rather, if that works
> it wouldn't be specific to $*ERR.
Um, you definitely can, and yes it's not specific to $*ERR, e.g.
my @lines;
$*OUT.^find_method('print').wrap: -> $self, $str {
You can't actually wrap print that way, can you? Or rather, if that works
it wouldn't be specific to $*ERR.
On Thu, Oct 25, 2018 at 6:16 PM Brian Duggan wrote:
> On Thursday, October 25, Richard Hainsworth wrote:
> > >: -> $status { $exit-args = $status; fail }
> >
> > Is the call to 'fail'
On Thursday, October 25, Richard Hainsworth wrote:
> >: -> $status { $exit-args = $status; fail }
>
> Is the call to 'fail' replicating the original action of ?
No -- the call to fail is throwing an exception. The idea
is that the exception could then be caught in the test.
> >: -> |c {
Hi,
(I am cross-posting this to stackoverflow #perl6 as well)
I am trying to create a cache of POD6 by precompiling them using the
CompUnit set of classes.
I can create, store and retrieve pod as follows:
use v6.c;
use nqp;
my $precomp-store =
I'm trying to understand this. Would someone provide a bit more explanation?
On 25/10/2018 10:47, Brian Duggan wrote:
On Sunday, October 21, Richard Hainsworth wrote:
so .. either I use your suggestion of 'exit note $message' which I find
elegant, but so far difficult to test.
You could