Hawkes, Mick I <mailto:[EMAIL PROTECTED]> wrote:
: Jeff
:
: Like I said in my text. I tried BOTH solutions, it is only commented
: out to show this. Yes I tried that Format, I commneted out my @loop =
: GetOfficers(); and likewise the other bit in main menu.
: The crux is my @loop = GetOfficers($self); doesn't work either!
Perhaps something else is wrong. Let's take it back to a simpler
case. Here's a minimal module to test this problem. I have eliminated
DBI and calls to HTML::Template. Does the error still occur?
If not, start adding your database stuff back in until the error
happens and you'll know the culprit.
HTH,
Charles K. Clarkson
--
Mobile Homes Specialist
254 968-8328
package Test_code_2;
use base 'CGI::Application';
use strict;
use warnings;
use Data::Dumper 'Dumper';
sub setup {
my $self = shift;
# Set the start mode.
$self->start_mode( 'mode_0' );
# Set the run modes.
$self->run_modes(
mode_0 => 'main_menu',
);
$self->param( mydbh => 'foo' );
}
sub main_menu {
my $self = shift;
my $loop = $self->get_officers();
return $self->query->pre( Dumper $loop );
}
sub get_officers {
my $self = shift;
my $dbh = $self->param( 'mydbh' );
return [ { HTML_ProjectName => 'foo' } ];
}
1;
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>