Brandon S. Allbery KF8NH |Perl 6| wrote:
    $stream.print (Buf $record);
> $stream.print($record.pack) # I would think?

Thank you so much for the reply. I was beginning to wonder if Perl 6 interest is dead, or if there is another secret lair for current enthusiasts that I'm unaware of.

A .pack member function on a Compact struct is indeed my first gut feeling, but at the end of the section he states specifically that packing is triggered by coercing to a Buf type.

Since nothing is sacred, I would propose that .pack is more sensible as the basic mechanism, to be used when doing this explicitly. And a conversion operation to Buf can be provided that simply calls .pack().


Reply via email to