Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ASP

getting cookies from a library

 

 

ModPerl asp RSS feed   Index | Next | Previous | View Threaded


orly.andico at gmail

Jan 10, 2006, 2:57 AM

Post #1 of 2 (2383 views)
Permalink
getting cookies from a library

hello all,

i want to "library'fy" some routines into a .pm
(instead of putting it in global.asa)

now i need to grab some cookie
$Request->Cookies("some-large-cookie-name");

i actually want to hide this cookie invocation in the library .pm so that
the actual program source doesn't have it (an aesthetic thing). so instead
of every page having that cookie line, there's just a simple function call.

problem: $Request object doesn't exist in the .pm
i also tried
$cooky = $Apache::ASP::Request->Cookies("some-large-cookie-name");

which compiles correctly but doesn't work.

or is the only solution to hide the function inside global.asa?


harcoh at ATConsultancy

Jan 10, 2006, 3:29 AM

Post #2 of 2 (2224 views)
Permalink
Re: getting cookies from a library [In reply to]

Orlando Andico wrote:

> hello all,
>
> i want to "library'fy" some routines into a .pm
> (instead of putting it in global.asa)
>
> now i need to grab some cookie
> $Request->Cookies("some-large-cookie-name");
>
> i actually want to hide this cookie invocation in the library .pm so
> that the actual program source doesn't have it (an aesthetic thing).
> so instead of every page having that cookie line, there's just a
> simple function call.
>
> problem: $Request object doesn't exist in the .pm
> i also tried
> $cooky = $Apache::ASP::Request->Cookies("some-large-cookie-name");
>
> which compiles correctly but doesn't work.
>
> or is the only solution to hide the function inside global.asa?

You will have to use $main::Request to access the Request object outside
an ASP script.

Good luck,

Harco

--
-----------------+--------------------+-------------------------------
Harco de Hilster AT Consultancy Phone: +31(0)24-3527282
Unix Consultant Toernooiveld 104 Fax: +31(0)24-3527292
6525 EC Nijmegen E-mail: harcoh [at] ATConsultancy
The Netherlands
-----------------+--------------------+-------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe [at] perl
For additional commands, e-mail: asp-help [at] perl

ModPerl asp RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.