Skip to content

Commit

Permalink
Add perl_set directive
Browse files Browse the repository at this point in the history
Defined in the ngx_http_perl_module
  • Loading branch information
fertapric authored and buglloc committed Sep 28, 2018
1 parent f5a54ad commit 0e03260
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions gixy/directives/directive.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,20 @@ def variables(self):
return [Variable(name=self.variable, value=self.value, provider=self)]


class PerlSetDirective(Directive):
nginx_name = 'perl_set'
provide_variables = True

def __init__(self, name, args):
super(PerlSetDirective, self).__init__(name, args)
self.variable = args[0].strip('$')
self.value = args[1]

@property
def variables(self):
return [Variable(name=self.variable, provider=self, have_script=False)]


class SetByLuaDirective(Directive):
nginx_name = 'set_by_lua'
provide_variables = True
Expand Down

0 comments on commit 0e03260

Please sign in to comment.