Passing variables to perl modules in nginx.conf:

Alexandr Gomoliako zzz at
Thu Jan 26 13:33:01 UTC 2012

On 1/26/12, Engin Akyol <emakyol at> 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');

More information about the nginx mailing list