[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Omaha.pm] warnings annoying me again



Grrr... another warning on a problem that can't occur.


sub begin_cookie_wrangler : Global {
   my ($self, $c, $cookie_name) = @_;

   return 0 unless ($cookie_name);
   $self->log->debug("begin_cookie_wrangler('$cookie_name')");

   # Clear this cookie if they asked us to.
   if ($c->req->param($cookie_name) eq "clear") {   # complaint is here


Use of uninitialized value in string eq at /Users/jhannah/src/Omni2/ Phoenix/script/../lib/Phoenix.pm line 219.


It'll never get to that line of code if $cookie_name isn't defined. But warnings doesn't understand that. So I have to add more code to get around the warning...


(
Off topic: Catalyst is awesome. Our copy of the book arrived and I'm making all kinds of neat-o progress on my current project... :)
   http://catalyst.perl.org/
)

j