[tpm] delimiting/reading YAML documents across sockets

Fulko Hew fulko.hew at gmail.com
Mon Jul 8 19:17:56 PDT 2013


On Mon, Jul 8, 2013 at 7:14 PM, Mike Stok <mike at stok.ca> wrote:

> On 2013-07-08, at 3:25 PM, Fulko Hew <fulko.hew at gmail.com> wrote:
>
> > Here's another entry for my 'yet to be composed' meeting
> > presentation entitled 'Things I've Stubbed My Toe On ...'
> >
> >
> > I'm trying to use YAML modules to send structures across
> > pipes from children to parent processes (or sockets).

...snip ...

> Doesn't YAML.pm do that automatically?

No, apparently it doesn't.

> Maybe https://metacpan.org/module/IO::YAML would be helpful?

I just stumbled across that, and yes it seems like it might be the ticket.

On Mon, Jul 8, 2013 at 7:32 PM, Uri Guttman <uri at stemsystems.com> added:

> you should separate encoding from packeting. you can choose any
> encoding and then wrap it in a common packet format for sending on
> the wire. what i did years ago was to create a trivial packet header/trailer.

... snip ...

That's what I was afraid of.
Not that its hard, but I would have expected an exchange specification to
have been included as part of the encoding specification regardless of
the transport mechanism.

I'll check out IO::YAML, and if not sufficient (or easy to understand) then
I'll make my own as Uri suggested.  I was prepared to do that, I just
wasn't expecting to have to (in this day and age).

Fulko


More information about the toronto-pm mailing list