From: Jakub Narebski Date: Sat, 19 Aug 2006 10:55:57 GMT Subject: Re: [PATCH] gitweb: use common parameter parsing and generation for "o", too. Message-ID: In-Reply-To: <20060818202013.GB30022@admingilde.org> 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