Re: Transparent packed C arrays



[A complimentary Cc of this posting was sent to
Tassilo v. Parseval
<tassilo.von.parseval@xxxxxxxxxxxxxx>], who wrote in article <3ufq31F10ag49U1@xxxxxxxxxxxxxx>:
> > I need something more Perlish, like
> >
> > my $obj = ToPerl 'L*', pack 'L*', @vec;
> > print $obj->[170];
> > $obj *= 5;
> >
> > $obj = $obj + $obj * $obj;
>
> Is it perhaps Convert::Binary::C that you were looking for?

Convert::Binary::C is a preprocessor and parser for C type definitions.

??? What could be a relation?

> I don't think it has that kind of
> overloading you asked for but it's easy to write your own wrapper module
> with the help of C::B::C.

The module should define (several?) hundred functions. Never a simple
job to start from scratch.

BTW, in my examples above I want something like pack('L!*'), not
pack('L*') - so that native arithmetic can be used for overloaded
operations.

Thanks,
Ilya
.