Oryx::MetaClass - abstract base class for all Oryx meta types
All Oryx components implement the interface defined herein. This is the basis for all Oryx components to share a common interface. All this really means is that when an object is created, retrieved, deleted etc. then each meta-instance (Oryx::Attribute, Oryx::Association etc.) associated with the class or instance can decide what it wants to do during each call. So when we say:
CMS::Page->create({ ... });
then in the create() method inherited from Oryx::Class we do something similar to:
create()
sub create { my ($class, $params) = @_; # do a few things with $params, exactly what would depend # on whether we're using DBI or DBM back-end $_->create($query, $params, ...) foreach $class->members; # return a newly created instance }
Here the members method (defined in Oryx::Class returns all meta-instances hanging off the class, and to each on is the create method delegated; hence the common interface.
members
create
meta object's create() hook
meta object's retrieve() hook
retrieve()
meta object's update() hook
update()
meta object's delete() hook
delete()
meta object's search() hook
search()
meta object's construct() hook
construct()
Each meta-type (with the exception of Oryx::Value types) has meta-data associated with it which is usually defined in the $schema class variable used in your persistent classes.
$schema
The following are accessors for this meta-data:
usually returns a hash reference which corresponds to the meta-data described in $schema.
get a value from the meta-data hash ref keyed by $name
$name
set a value from the meta-data hash ref keyed by $name
Oryx, Oryx::Class
Copyright (C) 2005 Richard Hundt <richard NO SPAM AT protea-systems.com>
This library is free software and may be used under the same terms as Perl itself.
2 POD Errors
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head1'
'=item' outside of any '=over'
To install Oryx, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Oryx
CPAN shell
perl -MCPAN -e shell install Oryx
For more information on module installation, please visit the detailed CPAN module installation guide.