X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=eg%2Ftable_template.pm;h=686bef6a838e9d5b4958e5d2fc102082b156ea3c;hp=2cc1e1d6ee2b544f87727af296cb36f2b04c9a46;hb=877a4eb85cb847bd314d6a9192fedb1dc35c5d02;hpb=52b07e8abd3946578a6c2701ec9e5195ec6b17e6 diff --git a/eg/table_template.pm b/eg/table_template.pm index 2cc1e1d6e..686bef6a8 100644 --- a/eg/table_template.pm +++ b/eg/table_template.pm @@ -1,11 +1,9 @@ package FS::table_name; +use base qw( FS::Record ); use strict; -use vars qw( @ISA ); use FS::Record qw( qsearch qsearchs ); -@ISA = qw(FS::Record); - =head1 NAME FS::table_name - Object methods for table_name records @@ -93,22 +91,24 @@ and replace methods. sub check { my $self = shift; - ''; #no error + my $error = + $self->ut_numbern('primary_key') + || $self->ut_number('validate_other_fields') + ; + return $error if $error; + + $self->SUPER::check; } =back -=head1 VERSION - -$Id: table_template.pm,v 1.2 2000-10-27 20:15:50 ivan Exp $ - =head1 BUGS The author forgot to customize this manpage. =head1 SEE ALSO -L, schema.html from the base documentation. +L =cut