mirror of
https://github.com/nginx/nginx.git
synced 2026-08-28 04:39:05 +00:00
allow perl "sub{..."
This commit is contained in:
parent
e6823b5199
commit
6db93ab8ba
1 changed files with 4 additions and 1 deletions
|
|
@ -761,7 +761,10 @@ ngx_http_perl_eval_anon_sub(pTHX_ ngx_str_t *handler, SV **sv)
|
|||
}
|
||||
}
|
||||
|
||||
if (ngx_strncmp(p, "sub ", 4) == 0 || ngx_strncmp(p, "use ", 4) == 0) {
|
||||
if (ngx_strncmp(p, "sub ", 4) == 0
|
||||
|| ngx_strncmp(p, "sub{", 4) == 0
|
||||
|| ngx_strncmp(p, "use ", 4) == 0)
|
||||
{
|
||||
*sv = eval_pv((char *) p, FALSE);
|
||||
|
||||
/* eval_pv() does not set ERRSV on failure */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue