APM: Just need structs
montgomery.conner at gmail.com
Thu Sep 13 20:55:10 PDT 2007
If you don't require encapsulation the easiest (and most efficient) solution
would be to forgo building an object to hold this data: there would be no
point and there is a semi-trivial amount of overhead in doing so.
You could use an array instead. Perl arrays are optimized and fast
(internally implemented as a C struct by the compiler), but because the
implementation of Perl variables is not strongly typed (like C) they will
dynamically accommodate a variety of data-types... so you'd likely only need
one type of container in Perl not three.
If you need to have a ternary grouping of similar data ( and if you
understand the use of anonymous data in Perl) you could use three arrays of
arrays, or an array of hashes (if you'd like named access to the data).
Or maybe I don't understand your intended use of this data...
On 9/13/07, Tim McDaniel <tmcd at panix.com> wrote:
> On Thu, 13 Sep 2007, Jason Bodnar <jason at shakabuku.org> wrote:
> > http://search.cpan.org/~nwclark/perl-5.8.8/lib/Class/Struct.pm
> > I've never used it but it looks like it's part of the perl dist.
> And it's even on the ancient RedHat Linux 9 box. Thanks -- I'm
> checking it out now.
> Tim McDaniel, tmcd at panix.com
> Austin mailing list
> Austin at pm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Austin