I have been playing with CGI::Ajax these days. Lately, I noticed my code always caused an error:
... returning Bad Request status 400
Then I found out that the error was due to I named one of CGI variable names as 'fname', meaning 'First Name'. Unfortunately, this CGI variable name 'fname' conflicts with a hard coded variable name in Ajax.pm. you may refer to this site for more details:
So, I renamed my variable name something else but 'fname'. Then my code works just fine!
I would say that Ajax.pm should not have hard coded a variable name like this. Or CPAN should have made 'fname' as a reserved name for Ajax.pm.
What do you guys think?
... returning Bad Request status 400
Then I found out that the error was due to I named one of CGI variable names as 'fname', meaning 'First Name'. Unfortunately, this CGI variable name 'fname' conflicts with a hard coded variable name in Ajax.pm. you may refer to this site for more details:
So, I renamed my variable name something else but 'fname'. Then my code works just fine!
I would say that Ajax.pm should not have hard coded a variable name like this. Or CPAN should have made 'fname' as a reserved name for Ajax.pm.
What do you guys think?