Class::Struct(3p) Perl Programmers Reference Guide Class::Struct(3p)
Class::Struct(3p) Perl Programmers Reference Guide Class::Struct(3p) # Class::Struct(3p) Perl Programmers Reference Guide Class::Struct(3p) NNAAMMEE # Class::Struct - declare struct-like datatypes as Perl classes SSYYNNOOPPSSIISS # use Class::Struct; # declare struct, based on array: struct( CLASS_NAME => [ ELEMENT_NAME => ELEMENT_TYPE, ... ]); # declare struct, based on hash: struct( CLASS_NAME => { ELEMENT_NAME => ELEMENT_TYPE, ... }); package CLASS_NAME; use Class::Struct; # declare struct, based on array, implicit class name: struct( ELEMENT_NAME => ELEMENT_TYPE, . ...