Froody::Structure - object representing the structure used by the response
# abstract class, see Froody::Method or Froody::ErrorType
Create a new reflection object
Class method that returns a regular expression that will determine if a string matches the specification passed in
A hash reference containing the specification of how the data that will be returned will be aranged - essentially the blueprint for constructing the response.
You probably don't want to create these by hand; The Froody::API::XML module will create these given a suitable example. See that module documentaion for more info.
The structure is a simple hash with a 'xpath' style key pointing to a hash containing elts (elements) and attr (attributes) arrayrefs.
elts
attr
{ 'people' => { attr => ['group'], elts => [qw/person/], }, 'people/person' => { elts => [qw/name/], attr => [qw/nick number/], text => 0, multi => 1, }, };
elts should contain a list of all elements under this node. Each one of these elements will require a further entry in the hash unless the element contains only text and cannot be repeated (for example, the title and description in the above data structure are like this.)
The hashrefs may also contain other flags. The text flag can be used to indicate if it is valid for this node to contain text or not. The multi flag is used to indicate if there can be repeate occurances of the elements.
text
multi
This would mean that the above data structure would validate this XML structure:
<people group="frameworks" /> <person nick="clkao" number="243"> <name>Chia-liang Kao</name> </person> <person nick="Trelane" number="234"> <name>Mark Fowler</name> </person> <person nick="Nichloas" number="238"> <name>Nicholas Clark</name> </person> <person nick="nnunley" number="243"> <name>Norman Nunley</name> </person> <person nick="skugg" number="214"> <name>Stig Brautaset</name> </person> <person nick="jerakeen" number="235"> <name>Tom Insam</name> </person> Frameworks is a department of Fotango. We work on lots of software, including writing tools like Froody. </people>
An example of the response we expect to see when this is rendered. This should be a Froody::Response object.
None known.
Please report any bugs you find via the CPAN RT system. http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Froody
Copyright Fotango 2005. All rights reserved.
Please see the main Froody documentation for details of who has worked on this project.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Froody, Froody::Repository, Froody::Method, Froody::ErrorType
To install Froody, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Froody
CPAN shell
perl -MCPAN -e shell install Froody
For more information on module installation, please visit the detailed CPAN module installation guide.