Re: About [PATCH 2/2] gitweb: Create a perl module to handle gitweb cgi params and vars
From: Jakub Narebski <hidden>
Date: 2016-06-15 22:48:54
On Tue, 3 Jun 2010, Pavan Kumar Sunkara wrote:
Jakub Narebski wrote:
quoted
Shouldn't evaluate_query_params(), evaluate_path_info(), and the subroutine that ties them together evaluate_and_validate_params() be in Gitweb::Request too? Ditto with evaluate_git_dir()?Well, evaluate_and_validate_params() and evaluate_path_info() contains calls to subroutines which are not yet moved into any package. So, what do you want to in such a case ?
O.K., in this case you should mention in the commit message that the subroutines evaluate_query_params(), evaluate_path_info(), evaluate_and_validate_params() and evaluate_git_dir() didn't get moved to Gitweb::Request because evaluate_and_validate_params() and evaluate_path_info() contain calls to check_head_link(), die_error() and validate_*() subroutines which are not yet moved into any package. And it doesn't make sense to put only some of them in Gitweb::Request. We can always move them later. P.S. The validate_*() subroutines could also be moved to Gitweb::Request. The check_head_link() subroutine looks like candidate for Gitweb::Util / Gitweb::Utils; I am not sure where one should put die_error() and friends: git_header_html(), git_footer_html(), get_page_title(), and other subroutines they use. -- Jakub Narebski Poland