sub name has unexpected interaction with s///

2018-10-22 Thread Richard Hogaboom
The following code: use v6; my $str = 'abc'; sub s {1}; say s; $str ~~ s:g/ b /x/; dd $str; say $/; outputs: 1 Str $str = "axc" (「b」) as expected. But, just remove the :g global flag and: ===SORRY!=== Error while compiling /home/hogaboom/hogaboom/Perl6/p6ex/./t.p6 Undeclared routine:    

Re: Appropriate last words

2018-10-22 Thread Richard Hainsworth
  And that is the way to test it. but then I cant work out how to get the message. I've been looking at Zoffix's Test::Output, but not   Incomplete sentence there.  I guess it doesn't work for you?  Tell us how you tried to use it, what you were expecting, and what happened