DBIx-DBO2
view release on metacpan or search on metacpan
DBO2/Docs/Comparison.pod view on Meta::CPAN
=head2 Support
Support for this module is available from the author (simonm@cavalletto.org). (The author is also available for support contracts or consulting engagements.)
=head2 Status
Actively developed and supported by the author. Recently released to CPAN after several years of in-house use, including current use on several e-commerce sites.
=head2 Other
A callback mechanism allows you to specify method names or arbitrary subroutines to be called immediately before or after each record is retrieved, inserted, updated, or deleted. You can add these callbacks to all record classes, to a particular clas...
The method-generator code leverages this capability; for example, declaring a one-to-many relationship using the "line_items --cascade_delete" option both declares a delete_items method, and adds that method to the "post_delete" callback so that it w...
=head1 SEE ALSO
See L<DBIx::DBO2> for an overview of this framework.
=cut
DBO2/Record.pm view on Meta::CPAN
sub demand_table {
my $self = shift;
$self->table() or croak("No table set for " . ( ref( $self ) || $self ));
}
########################################################################
=head2 Hooks
Many of the methods below are labeled "Inheritable Hook." These methods allow you to register callbacks which are then invoked at specific points in each record's lifecycle. You can add these callbacks to all record classes, to a particular class, or...
To register a callback, call the install_hooks method, and pass it pairs of a hook method name, and a subroutine reference, as follows: I<callee>->install_hooks( I<methodname> => I<coderef>, ... ).
Here are a few examples to show the possibilities this provides you with:
=over 4
=item *
To have each record write to a log when it's loaded from the database:
( run in 0.344 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )