[Dancer-users] befuddling Dancer error

Mr. Puneet Kishor punk.kish at gmail.com
Sun Mar 18 03:54:37 CET 2012


I have the following code

    if (defined $h) {
        $h = ($h == $nodata_valu) ? $nodata_desc : sprintf("%.2f", $h);
        debug "h: $h, nodata: $nodata_valu";
    }

which results in the following log entry

    [63130] debug @0.154003> [hit #4]h: 0.00, nodata: -3.40282346638529e+38

Yet,I get the following Dancer error

    Warning caught during route execution: Argument "" isn't numeric in numeric eq (==) at  
        if (defined $h) {
            $h = ($h == $nodata_valu) ? $nodata_desc : sprintf("%.2f", $h); 
            debug "h: $h, nodata: $nodata_valu";
        }


what gives?



--
Puneet Kishor


More information about the Dancer-users mailing list