[Maypole] error trying to get the beerdb example up and running
Daniel.Brunkhorst@dataport.de
Daniel.Brunkhorst@dataport.de
Wed, 12 May 2004 08:52:59 +0200
Hi list,
I would like to play around with Maypole a bit and wanted to use the
BeerDB example for first steps with this framework.
I copied the templates to "<DocumentRoot>/beerdb" directory, made the
BeerDB accessible to Apache and changed BeerDB.pm so that it contains
the correct path to the beerdb.db file. I also added the Location
directive to httpd.conf, so that BeerDB.pm gets called as a handler
whenever the /beerdb uri is accessed, which is what I do telling firefox
to open "http://localhost/beerdb/".
This results in the error message
"Can't use an undefined value as an ARRAY reference at bla/Maypole.pm
line 44"
in the Apache error log.
I copied the corresponding subroutine and marked the line in question.
Does anyone see something obvious that I am missing or doing wrong, then
please let me know before I spend hours debugging ...
sub init {
my $class =3D shift;
my $config =3D $class->config;
$config->{view} ||=3D "Maypole::View::TT";
$config->{view}->require;
die "Couldn't load the view class $config->{view}: $@" if $@;
############# next line is line 44
$config->{display_tables} ||=3D [ @{$class->config->{tables}} ];
#############
$class->view_object($class->config->{view}->new);
$class->init_done(1);
}
Thank you,
Daniel Brunkhorst.
________________________________=20
Dataport=20
Altenholzer Str 10 - 14, 24161 Altenholz=20
Internet:www.dataport.de=20
E-Mail: daniel.brunkhorst@dataport.de=20
Telefon: 0431 - 32 95 6318=20
Telefax: 0431 - 32 95 410=20
=20