Re: [PATCH] gitweb: use common parameter parsing and generation for "o", too.
From: Jakub Narebski <hidden>
Date: 2016-06-15 22:42:37
Martin Waitz wrote:
Perhaps introduce a new function which is used to access the parameters? This new function could check the URL or CGI->param or whatever and then return the requested value.
CGI->param. There is no reason to duplicate CGI module.
Then the action functions could get all parameters they need, validate them themselves and then act on them. This would suit my "break out parameter parsing from actions" and your "validate parameters in the action function". (And I really interpret your sentence in such a way that you only want to move the _validation_, not the actual parsing (which is done inside CGI->param at the moment.)
Validation and accessing. Parsing via CGI->param. There is another reason I want to move accessing and validation of parameters to the "action" function (perhaps, as you suggested, via "wrapper" function), namely removing some global variables. Perhaps it is unnecessary, but I wonder how well that works with mod_perl. Other global variables are configuration and do not change form execution to execution of script... -- Jakub Narebski Warsaw, Poland ShadeHawk on #git