my $manditory = (defined($query->param('method')) ? $query->param('method') : 0; my ($method, $error) = Validate->checked ($manditory, 1);