Profilo di agentzhHuman & MachineFotoBlogElenchiAltro ![]() | Guida |
|
18 luglio OpenResty running directly in PostgreSQL via PL/PerlA few hours' hack gives rise to the following funny stuff:
test=# select openresty_init(); openresty_init ---------------- t (1 row) test=# select openresty_request( test=# 'GET', '/=/view/PrevNextPost/current/79?user=agentzh.Public', test=# '',''); openresty_request ------------------------------------------------------------------------------------------------------------ [{"title":"The slides for my OpenResty D2 talk","id":"78"},{"title":"Client-side web site DIY","id":"80"}] (1 row) test=# select openresty_request('GET','/=/view/PrevNextPost/current/79?user=agentzh','',''); openresty_request --------------------------------------------------------- {"success":0,"error":"agentzh.Admin is not anonymous."} (1 row) The PL/Perl backend is not fully working yet but it's already functional as we see above ;) The definition for the (thin) SQL wrapper functions openresty_init and openresty_request can be found in the following file: http://svn.openfoundry.org/openapi/trunk/misc/plperl.sql And the PL/Perl backend for OpenResty is http://svn.openfoundry.org/openapi/trunk/lib/OpenResty/Backend/PLPerl.pm The code is much cleaner than I ever expected ;) 17 luglio Building (Ubuntu) debian packages for OpenResty and its dependenciesI've been building debian packages for OpenResty and its dependencies that are not already in the official Ubuntu debian repository. Here's what I got yesterday: http://agentzh.org/misc/debian/ For now only the i386 versions are provided :P I'll set up a personal debian repository for these deb files later. During the process I found the following articles very helpful: "Building Debian packages of Perl modules" http://www.debian-administration.org/articles/78 "Debian New Maintainer's Guide" http://www.debian.org/doc/maint-guide/ But still, I spent a lot of time to figure out the following details: For CPAN modules based on Module::Install, http://svn.openfoundry.org/openapi/trunk/debian/control If the CPAN module wants to install configure files to places like /etc/..., then it's required to manually create the file "conffiles" under http://svn.openfoundry.org/openapi/trunk/debian/conffiles And then modify the http://svn.openfoundry.org/openapi/trunk/debian/rules Another hack I have to do against rules' "install" rule is that I have to remove the perllocal.pod file manually from $(TMP), since inclusion of this file in the .deb file will cause conflicts like this: dpkg: error processing libjson-xs-perl_2.22-1_i386.deb (--install): For modules which require doing some post-installation processing, we should create the file |
|
|