IceWalkers.com - Linux Software downloads and news
Name : Password :
Linux SoftwareLinux RPMLinux HowtosLink UsAboutAdvertise

Data::Grove

 Perl Doc. Index   Quick jump:  
 

NAME

Data::Grove -- support for deeply nested structures

SYNOPSIS
 use Data::Grove;
 $object = MyPackage->new;
 package MyPackage;
 @ISA = qw{Data::Grove};
DESCRIPTION

Data::Grove provides support for deeply nested tree or graph structures. Data::Grove is intended primarily for Perl module authors writing modules with many types or classes of objects that need to be manipulated and extended in a consistent and flexible way.

Data::Grove is best used by creating a core set of ``data'' classes and then incrementally adding functionality to the core data classes by using ``extension'' modules. One reason for this design is so that the data classes can be swapped out and the extension modules can work with new data sources. For example, these other data sources could be disk-based, network-based or built on top of a relational database.

Two extension modules that come with Data::Grove are Data::Grove::Parent and Data::Grove::Visitor. Data::Grove::Parent adds a `Parent' property to grove objects and implements a `root' method to grove objects to return the root node of the tree from anywhere in the tree and a `rootpath' method to return a list of nodes between the root node and ``this'' node. Data::Grove::Visitor adds callback methods `accept' and `accept_name' that call your handler or receiver module back by object type name or the object's name.

Data::Grove objects do not contain parent references, Perl garbage collection will delete them when no longer referenced and sub-structures can be shared among several structures. Data::Grove::Parent is used to create temporary objects with parent pointers.

Properties of data classes are accessed directly using Perl's hash functions (i.e. `$object->{Property}'). Extension modules may also define properties that they support or use, for example Data::Grove::Parent adds `Parent' and `Raw' properties and Visitor depends on `Name' and `Content' properties.

See the module XML::Grove for an example implementation of Data::Grove.

METHODS
new( PROPERTIES )
Return a new object blessed into the SubClass, with the given properties. PROPERTIES may either be a list of key/value pairs, a single hash containing key/value pairs, or an existing Data::Grove object. If an existing Data::Grove is passed to `new()', a shallow copy of that object will be returned. A shallow copy means that you are returned a new object, but all of the objects underneath still refer to the original objects.
AUTHOR

Ken MacLeod,

SEE ALSO

perl(1)

 Perl Doc. Index   Quick jump:  
 
Inkscape 0.47
Vector graphic editor for SVG
DeleGate 9.9.6-pre5
Proxy server which runs on multiple platforms
Nano 2.1.99pre2
Emulate Pico while also offering a few enhancements.
My Money 2.0.49
Personal financial software
Linux Kernel 2.6 2.6.32-rc8
Linux Kernel
GCstar 1.5.0
Personal collections manager
ImageMagick 6.5.7.9
ImageMagick image processing studio
BibleTime 2.4
Bible study software for Linux / KDE
Tellico 2.1.1
Collection manager for books, music, videos, and bibliographies
Totem 2.28.4
Movie player for Gnome
Free IT Magazines, White Papers, eBooks, and more !
Oracle Magazine

Contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more.

Vulnerability Management for Dummies

Get all the Facts and See How to Implement a Successful Vulnerability Management Program.

Website Magazine

Has tapped premier talent in the Internet industry for our content and each and every issue will contain practical advice and insights for website owners.

Linux Software Map
Find Linux RPM
Best Rated Linux Software
Most Rated Linux Software
Linux Distributions
Linux Howtos
Quick Survey

Please take our survey and help us improve our website to serve you better.

Thank you.
Linux Software
Linux / IT Resources
Site Resources
Google
Privacy Policy
Contact Us
Submit Software
Advertising info