From: Neil Watkiss [mailto:[EMAIL PROTECTED]]
>
> Here is an update on the status of Inline::Struct.
Wow. The interface looks nice.
> The first working version is finished, but will not be available until
> Brian returns, because it requires a patch to Inline.pm. That patch is
> included at the bottom for the more curious inliners.
Can you make a 'pre' version available for the more curious inliners who
don't mind patching inline themselves?
> FEATURES
> o Automatically generates three things for bound structs:
> - a Perl class with the following autogenerated methods:
[...]
> _HASH -- returns a hash ref containing the field/value pairs.
> _ARRAY -- returns an array ref containing the field
> values. Struct
> order.
> _KEYS -- returns an array ref containing the field names. Struct
> order.
In both of the following cases, I assume you are just trying to avoid
clobbering the package namespace, but
o Do you mean to infer private with the leading _'s?
o Uppercase usually denotes Class methods
Perhaps a future version will support:
o TIEHASH and/or TIEARRAY?
o _VALUES?
> In addition, each field generates a method of the same
> name. If you pass it no arguments, it returns the value
> of that field. If you pass it an argument, it sets that
> field and returns the object, so that you can chain such
> assignments: $o->inum(10)->dnum(3.1415);
hmm that's interesting. Haven't seen that before.
What does it return if you attempt to assign invalid data?
Can you nest structures?
Garrett