Hello
I am trying to develop for the first time a perl module. It should work on a
server with mod_perl. The objects are not using mod_perl ($r) and are just
solving some of my work in a nicer way. Since I'm new in OOP on perl (I only
know C++) I would hear from some experts that the following is allowed in Perl
OO modules and does not conflict with mod_perl.
The question belongs to the constructor. I have $self as a class reference on
the brandnew object. Now in the rest of my constructor I do some Querys on a
MySQL database to get information about the authenticated user (.htaccess with
AuthenDBI). Afterwards I store the user-data retrieved from the database in a
hash-variable and put a reference to this hash in the $self object in the
following way:
$self->{'userdata'}->$hashref
Now I can get the different parts of userdata in other instance-methods with
code like the following ($po is an object of this class):
my $po = new Peseta;
print "<p>This desk belongs to: " . $po->{'userdata'}->{'ulname'} . "</p>";
My question is now: Can I be sure that there are no conflicts when several
users are requesting pages that work with this module? Can I be sure that the
object data is not shared between different requests and the object has really
only data corresponding to the actual request when I follow the general rules
for OOP under perl?
Thanks a lot for your answers
Andreas
--
____________________________________________________________________
Elektronikschule Tettnang http://www.elektronikschule.de/~grupp
Oberhofer Str. 25 mailto:[EMAIL PROTECTED]
88069 Tettnang PGP-Key available via mail. Use subject
Tel.: +49 7542 9372-33 Use subject: send pgp-public-key
Fax.: +49 7542 9372-40