Re: Check POP3 E-mail

From: Gunnar Hjalmarsson (noreply_at_gunnar.cc)
Date: 11/06/04


Date: Sat, 06 Nov 2004 17:46:56 +0100

krakle wrote:
> Gunnar Hjalmarsson wrote:
>> krakle wrote:
>>> If ran as a CGI everything works fine... HOWEVER, if ran as
>>> mod_perl @message retains the previous users data then the new
>>> users data adds to the array then the next users data will retain
>>> the last 2 users and so on... So Even if the current users
>>> session never had any "messages" to add @message will not be
>>> empty. BUT if you used
>>>
>>> my @message = ();
>>>
>>> just like the original poster used the array woudl be reset at
>>> the start of the script emptying any data left over from the
>>> previous session.
>>
>> As I explained in another message in this thread, your theory is
>> incorrect, and if you had written real code and run it, you'd have
>> found out for yourself.
>
> It ISN'T incorrect at all. Have you even used mod_perl???

Yes. But I have to admit that it has only been CGI scripts run under
Apache::Registry and similar.

The point I was trying to make is that package variables and lexically
scoped variables behave differently in this respect. However, see
Brian's message in this thread. Even if I haven't seen file scoped
lexicals retain their values, I trust that Brian knows what he is
talking about.

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


Relevant Pages

  • Re: Check POP3 E-mail
    ... Gunnar Hjalmarsson wrote in news:2v4dgrF2h90deU1@uni- ... > scoped variables behave differently in this respect. ... > lexicals retain their values, I trust that Brian knows what he is ... Sinan Unur ...
    (comp.lang.perl.misc)
  • Re: Check POP3 E-mail
    ... >> lexically scoped variables behave differently in this respect. ... subroutine, seemingly top level subroutines behaving as nested ditto, etc... ... scoped lexicals, i.e. top level lexicals in programs that are run under ... Gunnar Hjalmarsson ...
    (comp.lang.perl.misc)
  • Re: Interpolations within system()
    ... posted code is incorrect, you'd better stay out of Usenet. ... Gunnar Hjalmarsson ...
    (comp.lang.perl.misc)