|Keep It Simple, Stupid|
How best to return data from a package ???by lcanty (Friar)
|on Apr 28, 2004 at 03:35 UTC ( #348708=perlquestion: print w/replies, xml )||Need Help??|
lcanty has asked for the wisdom of the Perl Monks concerning the following question:
Still kind of new to Perl and was hoping for some Perl wisdom from anyone out there... have just recently started trying to develop my own Package(have checked CPAN and couldnt find an existing one) that handles the Logical Volume Manager LVM for AIX.
My question is more on proper coding style more than anything but given a command...
this returns the following data
Given this data, what would be the best way to return the data from the package to a script that calls it?
Should the pacakage return a nested hash or six individual hashes which corresponds to each of the headings except for "LV NAME", which would be used as the index. Or perhaps use something like Class::Struct ??? Though with Class::Struct not being a standard package i was a little weary of using it
Back to Seekers of Perl Wisdom