SPOPS::ClassFactory::DefaultBehavior - Default configuration methods called from SPOPS.pm
No synopsis.
This class has default behaviors for all SPOPS classes. They may or may not be used, depending on what subclasses do.
Note: Even though the first parameter for all behaviors is $class
,
they are not class methods.
The parameter refers to the class into which the behaviors will be installed.
conf_modify_config( \%config )
Set the values from 'field' into 'field_list', and parse the following entries from arrayrefs into hashrefs:
conf_id_method( \%config )
Generate the id()
method.
conf_read_code( \%config )
Reads the entries from code_class
,
finds them from @INC
and includes the libraries into the generated package.
The value for code_class
can be a scalar or arrayref.
Example:
code_class => [ 'My::OtherBehavior', 'My::Neato' ],
conf_relate_hasa( \%config )
Generate any methods used for relating an object to an object it contains. (See SPOPS::Manual::Relationships for more information.)
conf_relate_fetchby( \%config )
Generate a method fetch_by_$fieldname
for each entry listed in the configuration key 'fetch_by'. The generated method takes a value to search in $fieldname
.
Example:
fetch_by => [ 'last_name' ],
would generate a method with the signature:
sub fetch_by_last_name( $class, $last_name, \%params );
conf_add_rules( \%config )
Adds the rules listed in 'rules_from' and from all entries in the @ISA
of the class.
None known.
Nothing known.
Copyright (c) 2001-2004 intes.net, inc.. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Chris Winters <chris@cwinters.com>