Vladimir S. Tikhonjuk schrieb:
>>> Hi all!
>>>
>>> Our company has a backoffice project written on C++ ( Qt ) for Linux
>>> by my department. But nessesity appear's to make WEB interface, with all
>>> functions which our C++ program does. Now I have to choose among a lot
>>> of languages and technologies of WEB development.
>>>
>>> I have a lot of experience with perl, and we already have an Apache
>>> 2 WEB server, so first, I look at mod_perl. Reading documentation and
>>> making some practice with mod_perl, I didn't find ( or understand ) how
>>> to solve some, for my point of view, standart tasks.
>>>
>>> 1. Reading form parameters ( i.e. POST data of request header ).
>>>

>> Use CGI.pm or libapreq also known as Apache2::Request.
>>
>> http://search.cpan.org/~lds/CGI.pm-3.20/
>> http://search.cpan.org/~joesuf/libapreq2-2.07/
>>
>>
>>
>>

> Thanks a lot. This modules really helped me.
>
>>> 2. Result of first question Sessions.
>>>
>>> As I understand, I need session to save ( restore ) user data
>>> between requests. What for ? Now I'll try to explain.
>>>
>>>

>
> Well, can you post me short example of how to use Apache::Session with
> Apache:BI.
> I wan't make FirstHandle, which will be executed when user come to
> "/debitor" path. Connection
> to database will established in this handle. Then, when user go to the
> "/debitor/result" path,
> the SecondHadle will be executed, with the same ( as in FirstHandle )
> database connection.


Load Apache:BI like shown in the POD:
http://search.cpan.org/~pgollucci/Ap.../Apache/DBI.pm

This way the DBI-methods DBI->connect() and DBI->disconnect() are
overloaded. Afterwards you can call DBI->connect() and DBI->disconnect()
like you would in any perl-script. The magic is handled in the background.

Another thing I would think about is: Do you really need Physical
database users and not always connect using same user/pwd e.g.
apache/mypass and handle the rest of the magic in you application
otherwise Apache:BI has to connect for every every user in every child:

10 different user + 30 forked children => 300 Opened connections

Tom