06 June 2007
This post may be outdated due to it was written on 2007. The links may be broken. The code may be not working anymore. Leave comments if needed.
my @a = ( 'a', $c->req->param('a'), 'b', $c->req->param('b'), 'c', undef , 'd',, 'f' );$c->res->body(Dumper(\@a));
when we try "?b=1", output:
$VAR1 = [
'a',
'b',
'1',
'c',
undef,
'd',
'f'
];

see? $c->req->param('a') is NOT undef.
so when u try something like
$rs->update( {
column1 => $c->req->param('column1'),
column2 => $c->req->param('column2')
} );
then if column1 param is not specified, this would raise error because $rs try to update column1, column2, $c->req->param('column2'). we want 4 but u give me 3.

so man, be careful of that. :)


blog comments powered by Disqus