; # --> say Foo::Bar⏏:: # Nope - not compile - correct
>
> # this also should not compile
> say Foo::Bar::<>; # compiles - executes - does nothing useful -
> gives following strange output
> say Foo::Bar::{''}; # compiles - executes - does nothing useful -
More to the point of this, currently there is no way to reconstruct the
definition of a block, so you get its signature and an inline comment in
place of the body.
There is an easier way to see the same behavior: ::Bar::zape
This is getting the block/sub as a value instead of invoking it.
Maybe someone with better knowledge can answer. But I guess ;; is
https://docs.perl6.org/type/Signature#Long_names
The #`() part is a comment(inline).
And the number is what WHICH returns.
https://docs.perl6.org/routine/WHICH
On October 11, 2018 7:13:41 PM GMT+03:30, Richard Hogaboom
wrote:
I'll try to check that. It was recently changed, maybe it was not done
completely...
El jue., 11 oct. 2018 a las 17:44, Richard Hogaboom (<
richard.hogab...@gmail.com>) escribió:
> OK .. I mistakenly assumed that it should not compile from the doc
> '(This does not work with the variable)'.
>
>
OK .. I mistakenly assumed that it should not compile from the doc
'(This does not work with the variable)'.
my $tmp = Foo::Bar::<>;
say $tmp(); # zipi - works
if ';; $_? is raw' is the signature, what does the ';;' mean and what
does '#`(Block|62717656) ...' mean?
On 10/11/18 9:45 AM,
It means it's returning a Block.
dd Foo::Bar::<> # Block = -> ;; $_? is raw {
#`(Block|94777643161752) ... }
say Foo::Bar::<>() # zipi
does nothing useful -
gives following strange output
say Foo::Bar::{''}; # compiles - executes - does nothing useful -
same strange output
#say Foo::Bar::(''); # does not compile
# -> ;; $_? is raw { #`(Block|62717656) ... }
# what does this output mean?
say "end"; # prints 'end'
--
rahogaboom