On Sat, 29 Sep 2001, Johan Kuuse wrote:
> Hi,
>
> I'm trying to find a way to initiate global variables through a form, but I
> fail somehow.
> Below I show two wrappers for "MyApplication.pm",
> "my_application_fixed_data.pl" and "my_application_posted_data.pl".
> "my_application_fixed_data.pl" works fine, with persistent data which could
> be retreived from any run mode.
> "my_application_posted_data.pl" only works the first time a run mode is
> called, then the data is lost.
>
> "OK, so why don't you retreive the data the first time and just pass the it
> as a hidden field to other run modes?"
> In a bigger application I wrote, the data contains POP3 username, password
> and server name, so I don't wan't the data to be passed as a hidden field.
> In that application, I currently save and retreive the data using dbm (tie
> should be more proper), but if I could avoid temporary files completely and
> store the data as an application parameter, this would much be easier and, I
> guess, more secure.
Johan,
As I understand, your choices for persistance include:
* passing data through forms (which can a security risk)
* writing and retrieving data from disk (from some sort of file or database)
* keeping data in memory
Keeping data in memory involves a solution like mod_perl, which CGI::App
is compatible with. However, between using a temporary file and installing
and configuring mod_perl, I would say working files would be the quicker
solution to develop.
-mark
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]