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.
$class
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.
id()
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.
code_class
@INC
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.
fetch_by_$fieldname
$fieldname
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.
@ISA
None known.
Nothing known.
SPOPS::ClassFactory
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>
To install SPOPS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SPOPS
CPAN shell
perl -MCPAN -e shell install SPOPS
For more information on module installation, please visit the detailed CPAN module installation guide.