in reply to Managing C structs -with Perl-

Inline::Struct is an extension to Inline::C which does exactly what you want.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re: Re: Managing C structs -with Perl-
by khkramer (Scribe) on Jan 02, 2002 at 11:35 UTC

    I'm not sure Inline::Struct does do the right thing, here. Inline::Struct provides a simple way to manipulate a a C struct as a Perl object (which is very often exactly what one needs to do in the context of writing a bunch of Inline::C code). But AFAICT there are no documented methods for reading in a C struct from a blob of bytes or for dumping one out.

    That's exactly what pack and unpack are for.

    Having said that, it's probably worth writing to the Inline mailing list and suggesting such an addition to the API.

    Kwin