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: &Foo::Bar::zape
This is getting the block/sub as a value instead of invoking it.

Similarly, you can get something like that for subs in the setting, but
most of those will show you the dispatch proto instead because they don't
know which implementation to use:

    pyanfar Z$ 6 'say &say'
    proto sub say (|) {*}


On Thu, Oct 11, 2018 at 12:43 PM Siavash <siavash.askari.n...@gmail.com>
wrote:

> 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 <
> richard.hogab...@gmail.com> wrote:
>>
>> OK .. I mistakenly assumed that it should not compile from the doc
>> '(This does not work with the &zape variable)'.
>>
>> my $tmp = Foo::Bar::<&zape>;
>> 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, Siavash wrote:
>>
>>>  It means it's returning a Block.
>>>
>>>  dd Foo::Bar::<&zape> # Block &zape = -> ;; $_? is raw { 
>>> #`(Block|94777643161752) ... }
>>>  say Foo::Bar::<&zape>() # zipi
>>>
>>

-- 
brandon s allbery kf8nh
allber...@gmail.com

Reply via email to