Thanks Jesse (and Brett).  Adding the override attribute to the hidden()
method of CGI.pm indeed solved the problem.

I have another, more generic, question.  The first thing that my application
will do is ask the user which database they wish to connect to, since there
are several possible databases that the application can operate against.
So, I need to parameterize the database connection in the setup() method,
based on user input given at the beggining of the session.  One way to do
this would be to keep passing an application parameter between run-mode
methods.  In other words, have each run-mode method re-set the parameter:
  $db = $self->param('db') ;
  $self->param('db' => $db) ;

and have setup() use this parameter:
  if ( defined($db = $self->param('db')) ) {
      $dbh = DBI->connect("DBI:mysql:database=$db;host=localhost",
                        'slm',
                        _getSLMMySQLPassword(),
                        {PrintError => 0, # Don't report errors via warn()
                         RaiseError => 1} # Do report errors via die()
                       ) or die "Can't connect to database: $DBI::errstr" ;
      $self->param('mydbh' => $dbh);
    }

So the question is, Is this a reasonable approach?  Are there alternatives
that I should consider?


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to