X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FManual%2FComponent.pod;fp=lib%2FDBIx%2FClass%2FManual%2FComponent.pod;h=46170f9c2bddb4fb506b21c468e9481aac17e4fd;hb=fe0708a2d68b5d34b6bc6f7e70164c3e569f1dd0;hp=398ef2e7368459370e699989fbfae3cfa17440e8;hpb=01272eb81fe3a43e0a2f7befa465cc669945d543;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Manual/Component.pod b/lib/DBIx/Class/Manual/Component.pod index 398ef2e..46170f9 100644 --- a/lib/DBIx/Class/Manual/Component.pod +++ b/lib/DBIx/Class/Manual/Component.pod @@ -57,33 +57,29 @@ could override the insert and delete methods. # Do stuff with $self, like set default values. return $self->next::method( @_ ); } - + sub delete { my $self = shift; # Do stuff with $self. return $self->next::method( @_ ); } -Now, the order that a component is loaded is very important. Components -that are loaded first are the first ones in the inheritance stack. So, if -you override insert() but the DBIx::Class::Row component is loaded first -then your insert() will never be called, since the DBIx::Class::Row insert() -will be called first. If you are unsure as to why a given method is not -being called try printing out the Class::C3 inheritance stack. - - print join ', ' => Class::C3::calculateMRO('YourClass::Name'); +Now, the order that a component is loaded is very important. Components +that are loaded first are the first ones in the inheritance stack. So, if +you override insert() but the DBIx::Class::Row component is loaded first +then your insert() will never be called, since the DBIx::Class::Row insert() +will be called first. If you are unsure as to why a given method is not +being called try printing out the current linearized MRO. -Check out the L docs for more information about inheritance. + print join ', ' => mro::get_linear_isa('YourClass::Name'); =head1 EXISTING COMPONENTS =head2 Extra -These components provide extra functionality beyond +These components provide extra functionality beyond basic functionality that you can't live without. -L - Hooks for Storable freeze/thaw. - L - Class::DBI Compatibility layer. L - Build forms with multiple interconnected objects. @@ -98,8 +94,6 @@ L - Display the amount of time it takes to run queries L - Declare virtual columns that return random strings. -L - Force UTF8 (Unicode) flag on columns. - L - Implicit UUID columns. L - CRUD methods.