package MyApp::ConcreteTableInheritance::Schema::Result::Bowler; use namespace::autoclean; use Moose; use MooseX::Types::Moose qw(Num); extends qw( MyApp::ConcreteTableInheritance::Schema::Result::Cricketer ); # **************************************************************** # table setting(s) # **************************************************************** __PACKAGE__->table('bowlers'); __PACKAGE__->add_columns( bowling_average => { data_type => 'float', }, ); # Or, use DBIx::Class::MooseColumns with ( 'MyApp::Role::Schema::Result::Validatable' => { columns => { bowling_average => { isa => Num }, }, }, ); after _prepare_table => sub { my ($class) = @_; # some preparations return; }; # **************************************************************** # business logic(s) # **************************************************************** sub bowl { my $self = shift; printf( "%s (ave.: %0.3f) bowls a ball!\n", $self->name, $self->bowling_average, ); return; } # **************************************************************** # compile-time process(es) # **************************************************************** __PACKAGE__->_prepare_table; __PACKAGE__->meta->make_immutable; 1; __END__ =pod =encoding utf-8 =head1 NAME MyApp::ConcreteTableInheritance::Schema::Result::Bowler - blah blah blah =head1 SYNOPSIS # yada yada yada =head1 DESCRIPTION blah blah blah =head1 AUTHOR =over 4 =item MORIYA Masaki, alias Gardejo C<< >>, L =back =head1 COPYRIGHT AND LICENSE Copyright (c) 2010 MORIYA Masaki, alias Gardejo. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L and L. The full text of the license can be found in the F file included with this distribution. =cut