SPOPS::ClassFactory::DefaultBehavior - Default configuration methods called from SPOPS.pm


SPOPS documentation  | view source Contained in the SPOPS distribution.

Index


NAME

Top

SPOPS::ClassFactory::DefaultBehavior - Default configuration methods called from SPOPS.pm

SYNOPSIS

Top

No synopsis.

DESCRIPTION

Top

This class has default behaviors for all SPOPS classes. They may or may not be used, depending on what subclasses do.

METHODS

Top

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:

field
no_insert
no_update
skip_undef
multivalue

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 (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.

BUGS

Top

None known.

TO DO

Top

Nothing known.

SEE ALSO

Top

SPOPS::ClassFactory

COPYRIGHT

Top

AUTHORS

Top

Chris Winters <chris@cwinters.com>


SPOPS documentation  | view source Contained in the SPOPS distribution.