# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #116102]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=116102 >


<masak> r: my $in_prompt; sub issue_prompt { say ENTER { $in_prompt =
True; 42 } }; issue_prompt
<p6eval> rakudo cf2761: OUTPUT«Nil␤»
<masak> jnthn: why is the return value of the ENTER block Nil?
<jnthn> masak: Probably 'cus it doesn't support r-value use.
<jnthn> masak: Feel free to research in the spec if it should. :)
<masak> hokay.
<jnthn> And if the spec thinks it should, feel free to file a ticket :)
<masak> jnthn: I don't see anything in S04 says they're not rvalues.
<masak> jnthn: in fact, I'd expect ENTER to work as either an rvalue
or lvalue in block form.
<masak> r: say ENTER { 42 }
<p6eval> rakudo cf2761: OUTPUT«Nil␤»
<jnthn> masak: Well, clearly a bunch of phasers are useless as r-values.
<masak> jnthn: those that haven't happened yet, yes.
<jnthn> Like LEAVE :)
<masak> of course.
<masak> I'm not arguing against that :)
<jnthn> But yeah, I think ENTER should work
<jnthn> There's probably some nice things to do with it.
<jnthn> LEAVE say "We took {now - ENTER now}s to run";
<jnthn> For example

Reply via email to