Hello.
I have some questions about the embperl_object_app.
1. Will that application object called every time if a page is requested?
2. I have a configuration file similar to the configuration file in the web
example that comes with embperl-2.0b8. How can i access the variables
defined there in the webpages?
For example:
config.pl:
sub new {
my ($self, $req) = @_;
...
$self->{dbdsn} = 'dbi:Oracle:host=dbhost;sid=dbsid';
$self->{dbusr} = 'dbuser';
$self->{dbpwd} = 'secret';
webapp.pl:
$config = Execute({object => 'config.pl', syntax => 'Perl'});
$config->new($req);
$req->{config} = $config;
# so how i understand this
$req->{dbuser} = $req->{config}->{dbusr};
$req->{dbpwd} = $req->{config}->{dbpwd};
$req->{dsn} = $req->{config}->{dbdsn};
$req->{dbh} = DBI->connect("$req->{dsn}", "$req->{dbuser}","req->{dbpwd}");
somepage.epl:
[-
$req = shift;
...
$sth = $req->{dbh}->prepare($stmt);
...
-]
But $req->{dbh} is undefined.
Wolfgang
------------------------------------------------------------------------
Wolfgang Leideck
ONSYS GmbH
Fon: +49 (0)621/60-44104
Fax: +49 (0)621/60-73744
E-Mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]