Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Best Data Structure for passing in multiple arguments to a sub-routine

by clinton (Priest)
on Mar 13, 2007 at 17:32 UTC ( [id://604622]=note: print w/replies, xml ) Need Help??


in reply to Best Data Structure for passing in multiple arguments to a sub-routine

To make it easier to read and to maintain (I presume this is going to be some sort of template), it may be easiest to represent the data in YAML (YAML::Syck for speed). For some elements, you may need hashes, for others array - writing it down in YAML notation makes it easy to adjust your data structure to suit the need.

For instance, you could represent your example as follows:

slides: - no: 1 type: ppBLAHBLAH title: My title elements: - type: picture path: /my/path width: 100 height: 50 - type: text box text: | A bunch of flowing text style: italics
  • Comment on Re: Best Data Structure for passing in multiple arguments to a sub-routine
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://604622]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-04-24 03:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found