Re: uninitialized value at ... CGI/Cookie.pm line 70.

2000-06-14 Thread Drew Taylor

Ronald Schmidt wrote:
 
 The full warning message on our system (Solaris, Apache 1.3.3, mod_perl
 1.21?, perl 5.005_02) is:
 
 [Tue Jun 13 17:37:25 2000] null: Use of uninitialized value at
 /usr/local/lib/perl5/5.00502/CGI/Cookie.pm line 70.
Which line is #70 in the script you posted? It's kind of hard to tell
since it looks like you snipped some lines.

-- 
Drew Taylor
Vialogix Communications, Inc.
501 N. College Street
Charlotte, NC 28202
704 370 0550
http://www.vialogix.com/



RE: uninitialized value at ... CGI/Cookie.pm line 70.

2000-06-14 Thread Ronald Schmidt

The warning seems to be coming from inside the standard module CGI::Cookie -
not from inside the driver code included with my message.

Ronald Schmidt

-Original Message-
From: Drew Taylor [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 14, 2000 9:42 AM
To: Ronald Schmidt
Cc: '[EMAIL PROTECTED]'
Subject: Re: uninitialized value at ... CGI/Cookie.pm line 70.


Ronald Schmidt wrote:
 
 The full warning message on our system (Solaris, Apache 1.3.3, mod_perl
 1.21?, perl 5.005_02) is:
 
 [Tue Jun 13 17:37:25 2000] null: Use of uninitialized value at
 /usr/local/lib/perl5/5.00502/CGI/Cookie.pm line 70.
Which line is #70 in the script you posted? It's kind of hard to tell
since it looks like you snipped some lines.

-- 
Drew Taylor
Vialogix Communications, Inc.
501 N. College Street
Charlotte, NC 28202
704 370 0550
http://www.vialogix.com/



Re: uninitialized value at ... CGI/Cookie.pm line 70.

2000-06-14 Thread darren chamberlain

Ronald Schmidt ([EMAIL PROTECTED]) said something to this effect:
 The full warning message on our system (Solaris, Apache 1.3.3, mod_perl
 1.21?, perl 5.005_02) is:
 
 [Tue Jun 13 17:37:25 2000] null: Use of uninitialized value at
 /usr/local/lib/perl5/5.00502/CGI/Cookie.pm line 70.
 
 We are porting perl/cgi scripts to run under Apache;:Registry and in the
 process of porting I am getting the warning above from one of the scripts.
 In investigating the problem I went to
 http://perl.apache.org/guide/porting.html to look for examples of cookie use
 with mod_perl.  I found that with slight modification to one of the samples
 I could re-produce the problem.  The modification involved moving the
 initialization of a CGI object reference out of a subroutine.  Initializing
 our $q = new CGI; in a subroutine would mean re-arranging a fair amount of
 code in our scripts.  Has anyone hit this before? Does anyone have a
 suggestion for getting around the problem?  The code that reproduces the
 problem follows.
 
 Ronald Schmidt

I always find it easier to parse the cookies myself, rather than rely on
{Apache,CGI}::Cookie. I use something like:

my %cookies = map { $1 = $2 if (/([^=]+)=(.*)/) }
  grep !/^$/, split /;\s*/,$r-header_in('cookie');

and then %cookies has the names as keys, and the values as values. Creating
cookies is a matter; I usually join vars on '; '.

I would try using this method to fetch the cookies, and then dump them
to STDERR and see what you have. I have found that browsers can mangle
cookies, and then of course no cookie parsing module will help.

darren

-- 
Wise people think all they say; fools say all they think.