Class::DBI::Pg troubles
[prev]
[thread]
[next]
[Date index for 2004/07/08]
I'm trying to use Class::DBI::Pg 0.03. It passes its tests (I just
specifically reran it) but in my program it works for some tables and on
others the run fails with Perl unable to find set_up_table . My CDBI base
class is Webcontent::Tables . The class giving me trouble this moment is
Webcontent::Tables::Websites. Each table is in a separate Perl file
and there is another file which has a use statement to bring each one in.
I have tried putting explicitly into Websites.pm
use base qw(Webcontent::Tables Class::DBI::Pg);
but it doesn't help.
I'm currently using it in the Tables class.
package Webcontent::Tables;
use strict;
BEGIN {
use Exporter ();
use vars qw ($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
use version;
my $version = new version qw$Revision: 1.7 $;
@ISA = qw (Exporter);
#Give a hoot don't pollute, do not export more than needed by default
@EXPORT = qw ();
@EXPORT_OK = qw ();
%EXPORT_TAGS = ();
}
use base qw(Class::DBI::Pg);
Webcontent::Tables->set_db('Main',
'dbi:Pg:dbname=webcontent','','',{AutoCommit => 1});
__END__
1;
package Webcontent::Tables::Websites;
use base qw/Webcontent::Tables/;
use strict;
__PACKAGE__->set_uo_table('websites');
__PACKAGE__->sequence('websites_site_id_seq');
__END__
1;
but this fails to run:
perl -w Websites.pm
Can't locate object method "set_uo_table" via package "Webcontent::Tables::Websites"
|
Class::DBI::Pg troubles
Dana Hudes 19:32 on 08 Jul 2004
|