Apologies if this has been asked before:
I have a parser that I've developed in C, and I'm using Data::Dumper style
format to allow people to use this data in their Perl programs. This
technique doesn't scale for feces...
Obviously Inline is the way to go to pass data from C-land to Perl land.
I'm going to have to get real cozy with the perlguts and examples provided
in the Inline distribution. However, in order to save the 3x overhead
(migrating all my C hashes, lists, etc. into the Perl counterparts
exhaustively), I would like to create *only* the data requested on the fly
in the Perl script. In other words:
#!/usr/intel/bin/perl -w
use strict;
use InlineParser;
${$hashref}{$design}{"ports"} # this is an array reference
This immediately force the creation of the toplevel hash (with the key in
$design) to be created and return the array for "ports". None of the other
keys in the top-level hashref need to be populated yet.
Is the only way to use this to use Tie in conjunction with Inline? Or am I
making this more difficult than it should be?
-Clint