comparison src/http/modules/perl/ngx_http_perl_module.c @ 3132:6cb238e091a9

allow perl "sub{..."
author Igor Sysoev <igor@sysoev.ru>
date Tue, 15 Sep 2009 09:37:16 +0000
parents 4a2d3f571de6
children 008a3462e1d0
comparison
equal deleted inserted replaced
3131:49fd9e436675 3132:6cb238e091a9
759 if (*p != ' ' && *p != '\t' && *p != CR && *p != LF) { 759 if (*p != ' ' && *p != '\t' && *p != CR && *p != LF) {
760 break; 760 break;
761 } 761 }
762 } 762 }
763 763
764 if (ngx_strncmp(p, "sub ", 4) == 0 || ngx_strncmp(p, "use ", 4) == 0) { 764 if (ngx_strncmp(p, "sub ", 4) == 0
765 || ngx_strncmp(p, "sub{", 4) == 0
766 || ngx_strncmp(p, "use ", 4) == 0)
767 {
765 *sv = eval_pv((char *) p, FALSE); 768 *sv = eval_pv((char *) p, FALSE);
766 769
767 /* eval_pv() does not set ERRSV on failure */ 770 /* eval_pv() does not set ERRSV on failure */
768 771
769 return; 772 return;