Phil Lobbes wrote:
Software versions:
  mod_perl-1.99_12-2
  perl-5.8.3-17.5.legacy
  httpd-2.0.51-1.10.legacy
  Fedora Core 1 (kernel 2.4.22-1.2199.8.legacy.nptl)

I have a custom application running under Apache::Registry w/mod_perl
using strict and warnings everywhere.

I have run into a case where sometimes a subroutine variable declared
with my() inside an OO method retains its value somehow(!?!).  I think I
must be going crazy.  The code looks like this:

 sub validate {
     my $app     = shift;
     my $custid  = $app->get_session_var('id') || "";
     my $sub_rec = $app->get_subscriber_rec($custid) if($custid);
     my $uid_int = $sub_rec->{'uid_int'}             if($sub_rec);
Don't do that.
Use ? : ternnay operator, or move the if() out of the declaration.
This has been brought up before, but I forget what its called. Google this list archives.


Also, you using ancient versions of things -- ~2.5 years ago.

--
------------------------------------------------------------------------
Philip M. Gollucci ([EMAIL PROTECTED]) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."

Reply via email to