[Omaha.pm] warnings annoying me again

Jay Hannah jay at jays.net
Tue Jan 22 19:28:19 PST 2008


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





More information about the Omaha-pm mailing list