(Top) < run_modes() | Writing a run-mode method: start() > |
$webapp->param(dbh => dbconnect()); |
Stores arbitrary object properties.
Here, stores a database handle returned by a function we've created.
param() is also an accessor:
my $dbh = $webapp->param('dbh'); |
Another example:
$webapp->param(timestamp => localtime()); |
(Note: param() is not identical to CGI.pm's param() method)
CGI::Application (v.2.0) |
14 |