Welcome! Log In Create A New Profile

Advanced

Re: perl module for nginx

Maxim Dounin
May 14, 2014 01:00PM
Hello!

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 :
> http://nginx.org/en/docs/http/ngx_http_perl_module.html
> 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
> :
> http://wiki.nginx.org/HttpLuaModule
>
> 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.

[1] http://nginx.org/en/docs/http/ngx_http_auth_request_module.html

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

perl module for nginx

David Coutadeur May 14, 2014 12:48PM

Re: perl module for nginx

Maxim Dounin May 14, 2014 01:00PM

Re: perl module for nginx

David Coutadeur May 14, 2014 01:08PM

Re: perl module for nginx

Lord Nynex May 15, 2014 08:38PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 168
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready