git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: About [PATCH 2/2] gitweb: Create a perl module to handle gitweb cgi params and vars

From
Jakub Narebski <jnareb@gmail.com>
Date
Jun 3, 2010, 10:17 UTC
Message-ID
<201006031217.07525.jnareb@gmail.com>
In-Reply-To
<AANLkTilYSAj_byhZ1WDEBrYOAj6OZVsyDmp59vuK0tQz@mail.gmail.com>
On Tue, 3 Jun 2010, Pavan Kumar Sunkara wrote:
> Jakub Narebski wrote:
Show 9 quoted lines
>> 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
Previous: Pavan Kumar Sunkara
Message 6 of 6 in “About [PATCH] gitweb: Create a perl module to store gitweb configuration”
  1. Jakub NarebskiJun 2, 2010
  2. Pavan Kumar SunkaraJun 3, 2010
  3. Jakub NarebskiJun 3, 2010
  4. About [PATCH 2/2] gitweb: Create a perl module to handle gitweb cgi params and varsJakub Narebski, Jun 3, 2010
  5. Pavan Kumar SunkaraJun 3, 2010
  6. Jakub NarebskiJun 3, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.