package MyTable sub new { ... } sub buildFromSql { $self->{t} = Data::Table::fromSql($dbh,$sql); } sub AUTOLOAD { my $self = shift; my $command = our $AUTOLOAD; $command =~ s/.*://; $self->{t}->$command(@_); } #### package TableA @ISA = ("MyTable"); sub new { $self = $class->SUPER::new(@_); $self->buildFromSql($dbh,$sql) } #### ## CLIENT my $table = new TableA(); $table->html2."\n";
## package TableA @ISA = ("MyTable"); sub new { $self = $class->SUPER::new(@_); $self->buildFromSql($dbh,$sql) } ##
## ## CLIENT my $table = new TableA(); $table->html2."\n";