package MyApp::ConcreteTableInheritance::Schema::Result::Footballer; use namespace::autoclean; use Moose; use MooseX::Types::Moose qw(Str); extends qw( MyApp::ConcreteTableInheritance::Schema::Base::Result::Player ); # **************************************************************** # table setting(s) # **************************************************************** __PACKAGE__->table('footballers'); __PACKAGE__->add_columns( club => { data_type => 'varchar', size => 32, }, ); # Or, use DBIx::Class::MooseColumns with ( 'MyApp::Role::Schema::Result::Validatable' => { columns => { club => { isa => Str }, }, }, ); after _prepare_table => sub { my ($class) = @_; # some preparations return; }; # **************************************************************** # business logic(s) # **************************************************************** sub kick { my $self = shift; printf( "%s (%s) kicks a ball!\n", $self->name, $self->club, ); return; } # **************************************************************** # compile-time process(es) # **************************************************************** __PACKAGE__->_prepare_table; __PACKAGE__->meta->make_immutable; 1; __END__ =pod =encoding utf-8 =head1 NAME MyApp::ConcreteTableInheritance::Schema::Result::Footballer - 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