allow perl "sub{..."
This commit is contained in:
parent
16555b4bb3
commit
bbb7f62992
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…
Reference in a new issue