diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-09-15 09:37:16 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-09-15 09:37:16 +0000 |
commit | 6db93ab8ba4ca496feadf6267ab6d2c42187ef39 (patch) | |
tree | 72404aad284a8bf445825340e1117aa68234c029 /src/http/modules/perl/ngx_http_perl_module.c | |
parent | e6823b5199cae9f530b69d8f70e15fb7114b2191 (diff) | |
download | nginx-6db93ab8ba4ca496feadf6267ab6d2c42187ef39.tar.gz nginx-6db93ab8ba4ca496feadf6267ab6d2c42187ef39.zip |
allow perl "sub{..."
Diffstat (limited to 'src/http/modules/perl/ngx_http_perl_module.c')
-rw-r--r-- | src/http/modules/perl/ngx_http_perl_module.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/http/modules/perl/ngx_http_perl_module.c b/src/http/modules/perl/ngx_http_perl_module.c index 634801ece..41372ce2d 100644 --- a/src/http/modules/perl/ngx_http_perl_module.c +++ b/src/http/modules/perl/ngx_http_perl_module.c @@ -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 */ |