in reply to Need help untangling inheritance and scope in CGI::App module.

Greetings hesco,

I haven't tested this, but just looking briefly at your code, the first thing I'd try is to change the 8th line of cgiapp_init() to this:

my $dbh = $self->dbh(); my $result = auth_config($dbh); # ...or instead, simply... my $result = auth_config($self->dbh());

Inside your sub dbh, you shift off the first element of @_, but calling dbh() directly means you're not passing anything into the sub. Calling $self->dbh() will fix this.

gryphon Development Manager (WDDC)
code('Perl') || die;