Passing variables to perl modules in nginx.conf:

Engin Akyol emakyol at gmail.com
Thu Jan 26 20:17:42 UTC 2012


Awesome! That worked.


On Thu, Jan 26, 2012 at 7:33 AM, Alexandr Gomoliako <zzz at zzz.org.ua> wrote:
> On 1/26/12, Engin Akyol <emakyol at gmail.com> wrote:
>
>> Is it possible to pass variables to embedded perl modules via
>> nginx.conf and if so how would that be done?
>
>    set $foo "bar";
>    perl My::super_task "A";
>
> In perl:
>
>    sub handler {
>        my $r = shift;
>        my $foo = $r->variable('foo');
>        ...
>    }
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx



More information about the nginx mailing list