http://qs321.pair.com?node_id=348708

lcanty has asked for the wisdom of the Perl Monks concerning the following question:

Morning Monks,

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...

lsvg -l rootvg
this returns the following data
LV NAME TYPE LPs PPs PVs LV STATE MOUNT hd5 boot 1 2 2 closed/syncd N/A hd6 paging 64 128 2 open/syncd N/A pdumplv sysdump 64 64 1 open/syncd N/A hd8 jfslog 1 2 2 open/syncd N/A hd4 jfs 5 10 2 open/syncd / hd2 jfs 122 244 2 open/syncd /usr hd9var jfs 33 66 2 open/syncd /var hd3 jfs 49 98 2 open/syncd /tmp hd1 jfs 47 94 2 open/syncd /home
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

TIA