Rob Kinyon > Graph-Template-0.05 > Graph::Template::Container::Data

Download:
Graph-Template-0.05.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

Graph::Template::Container::Data

PURPOSE ^

To provide looping

NODE NAME ^

LOOP

INHERITANCE ^

Graph::Template::Container

ATTRIBUTES ^

CHILDREN ^

None

EFFECTS ^

None

DEPENDENCIES ^

None

USAGE ^

  <data name="LOOPY">

    ... Children here ...

  </data>

In the above example, the children nodes would have access to the LOOPY array of hashes as parameters. Each iteration through the array would expose a different hash of parameters to the children.

The children are expected to be DATAPOINT nodes. I'm not quite sure what will happen if the nodes aren't. I also have not tested what will happen if you have a DATA node within a DATA node.

You can have more than 2 DATAPOINT nodes in a DATA node. What will happen is the first will be the X-axis. The remaining will be graphed on the Y-axis. See GD::Graph for more info.

These loops work just like HTML::Template's loops. (I promise I'll give more info here!)

There is one difference - I prefer using Perl-like scoping, so accessing of variables outside the LOOP scope from within is perfectly acceptable. You can also hide outside variables with inner values, if you desire, just like Perl.

AUTHOR ^

Rob Kinyon (rkinyon@columbus.rr.com)

SEE ALSO ^

DATAPOINT

syntax highlighting: