perl module for nginx

Maxim Dounin mdounin at
Wed May 14 16:58:42 UTC 2014


On Wed, May 14, 2014 at 06:47:26PM +0200, David Coutadeur wrote:

> Hello,
> I am trying to build a perl access handler module into nginx, thanks to this
> API :
> but I have some difficulties to do so.
> Indeed, I would need some tools like
> - a mean to share variables between handlers,
> - a mean to call my handler at access phase.
> For example, I have made a basic handler in lUA with this more complete API
> :
> Does anybody have ideas on how to achieve the two functionnalities in the
> current perl API ?
> Will this lack of features for perl API be filled in the future ? In a near
> future ? Or do you advise other actions ?

Sharing variables (I believe you really want to do so between 
requests) can be done using normal Perl things like global 
variables (or, if you want many workers to share the same data, 
using shared memory, see various perl modules available on CPAN).

Calling the handler at access phase isn't something you can do 
without modifications of the code.  On the other hand, it may be a 
good idea to use auth request module[1] instead, and write a 
subrequest handler in embedded perl.


Maxim Dounin

More information about the nginx mailing list