One function, jsodump, is exported. jsodump accepts a list of named parameters; two of these are required and the rest are optional.
The name to be used for the prototype object function.
A reference to an array of hashes(loh) or hash of hashes(hoh) to dump.
A reference to an array containing a list of the object attributes (hash keys). This is useful if every object is not guaranteed to posses a value for each attribute. It could also be used to exclude data from being dumped.
A scalar, if true output is one attribute per line. The default; false; is one object per line.
A scalar, if true output is numbered every 5 lines. The value provided should be the number of lines printed before this output. For example if a CGI script included:
The client would see:
making it easier to read and/or debug.
A reference to a scalar. jsodump will set the scalar's value to the number of the last line of numbered output produced when lineIN is specified. Thus you may pass the scalar to a subsequent call to jsodump as the value of lineIn for continuous numbering. For example:
jsodump(protoName => "sandwich", dataRef => \@lunch, lineIN => 4, lineOUT => \$.); jsodump(protoName => "sandwich", dataRef => \%lunch, lineIN => $.);
A scalar, if true the parameters value is used as the name of an array to be output which will contain a list of all the dumped object. This allows data-ignorant client side code which need only traverse the named array.
jsodump(protoName => "sandwich", dataRef => \@lunch, listObjects=> "sandwiches");
would append the following to the output
sandwiches = new Array('BLT', 'PBnJ');
Nothing that am I aware of.
Jerrad Pierce email@example.com, firstname.lastname@example.org. http://pthbb.org/