perl/plp/.git
16 years agofix setting PLPcache from apache configuration
Mischa POSLAWSKY [Fri, 14 Mar 2008 23:40:49 +0000 (00:40 +0100)]
fix setting PLPcache from apache configuration

Apache has been split from PLP package, so need to specify variable
explicitly.

16 years agomake mod_perl request object a global in PLP::Apache only
Mischa POSLAWSKY [Fri, 14 Mar 2008 23:08:38 +0000 (00:08 +0100)]
make mod_perl request object a global in PLP::Apache only

No reason to always create $PLP::r, as it's only used with Apache.

16 years agoeg/plpinfo.plp demo/status page
Mischa POSLAWSKY [Tue, 2 Oct 2007 10:23:56 +0000 (12:23 +0200)]
eg/plpinfo.plp demo/status page

Demo page reporting about the current status of Perl and PLP. Useful as
test page (see if correct versions are loaded as they should, and what
variables are set), or at least as a somewhat larger example of a plp
page.

Modelled closely after PHP's phpinfo() output (even color scheme is the
same, albeit html is much cleaner) to keep it as familiar as possible to
php switcheroos.

16 years agoFastCGI interface (PLP::CGI extension using FCGI)
Mischa POSLAWSKY [Tue, 2 Oct 2007 10:23:27 +0000 (12:23 +0200)]
FastCGI interface (PLP::CGI extension using FCGI)

Do not exit from PLP::CGI, allowing it to be used consecutively.

Coincidentally, PLP::FastCGI does just that: extending the PLP::CGI
interface to handle FCGI requests. Its import() runs a PLP dispatcher,
so a FastCGI executable (example plp.fcgi is provided) only has to
C<use PLP::FastCGI>. If a server supports run arguments, a wrapper
script isn't even needed this way: just do /usr/bin/perl -MPLP::FastCGI.

PATH_TRANSLATED is explicitly removed from environment so file names are
gotten from SCRIPT_*, which mostly already point to the requested script
(at least much more correctly than can be determined from PATH_*).

This seems to work correctly on at least:
- Apache 1.3.34, 2.2.4, 2.2.8 with mod_fastcgi and mod_fcgid
- Lighttpd 1.4.7 and 1.4.18 with mod_fastcgi

Caching can be controlled by setting an environment variable PLP_CACHE
(unlike with mod_perl, no other means of configuration are provided).
If not specified, PLPcache will be turned on.

fcgi script

16 years agogeneralize reading post input
Mischa POSLAWSKY [Tue, 2 Oct 2007 10:08:26 +0000 (12:08 +0200)]
generalize reading post input

Input retrieval differs per server interface, so set $PLP::read to a
function providing a read of specified number of bytes. This differs
from $PLP::print as it's not just a name, because it won't be evalled
but called directly.

16 years ago404 handling for pre-parsed CGI handling
Mischa POSLAWSKY [Fri, 27 Jul 2007 19:13:52 +0000 (19:13 +0000)]
404 handling for pre-parsed CGI handling

When using SCRIPT_FILENAME provided by server, still make sure the file
exists. Lighttpd can provide non-existant files when setting check-local
is turned off.

PATH_TRANSLATED handling (i.e. Apache) is unaffected: always does 404
checking when walking the path.

16 years agoclean up CGI environment parsing
Mischa POSLAWSKY [Fri, 27 Jul 2007 18:36:22 +0000 (18:36 +0000)]
clean up CGI environment parsing

When parsing PATH_TRANSLATED, put results in SCRIPT_* variables. Create
additional PLP_* vars only later. This makes both cases result in the
same intermediate state, and therefor easier to follow.

16 years agoLighttpd CGI support
Mischa POSLAWSKY [Wed, 25 Jul 2007 16:05:42 +0000 (18:05 +0200)]
Lighttpd CGI support

In case no PATH_TRANSLATED environment var is present, assume request is
already parsed and SCRIPT_* pointing to target script (not plp handler).
This supports at least Lighttpd CGI requests.  Functionality unchanged
for Apache1/2 CGI.

16 years agouse recommended apache2 constants
Mischa POSLAWSKY [Mon, 30 Jul 2007 09:04:03 +0000 (11:04 +0200)]
use recommended apache2 constants

According to mod_perl documentation (porting/compat):

REDIRECT and similar constants have been deprecated in Apache for
years, in favor of the HTTP_* names (they no longer exist Apache
2.0). mod_perl 2.0 API performs the following aliasing behind the
scenes

16 years agomake PLP::Apache mod_perl 2.0 compatible
Mischa POSLAWSKY [Mon, 30 Jul 2007 08:22:28 +0000 (10:22 +0200)]
make PLP::Apache mod_perl 2.0 compatible

16 years agomove plp server handlers to respective modules
Mischa POSLAWSKY [Wed, 25 Jul 2007 16:21:02 +0000 (18:21 +0200)]
move plp server handlers to respective modules

Keep compatibility wrappers for handler() and everything().

16 years agotest-suite directory
Mischa POSLAWSKY [Wed, 4 Jul 2007 19:43:11 +0000 (21:43 +0200)]
test-suite directory

Anticipating more tests.

Also clarifies (limited) testing scope by filename.

17 years agoseperate modules for backend-specific code
Mischa POSLAWSKY [Sat, 31 Mar 2007 02:56:50 +0000 (04:56 +0200)]
seperate modules for backend-specific code

Split out initialization and other specifics for CGI and mod_perl (Apache).

17 years agoremove disabled Cwd include
Mischa POSLAWSKY [Sat, 31 Mar 2007 02:44:37 +0000 (04:44 +0200)]
remove disabled Cwd include

17 years agodocumentation fixes
Mischa POSLAWSKY [Sat, 31 Mar 2007 02:38:26 +0000 (04:38 +0200)]
documentation fixes

Typo, small mistake in example, unmarked code.

17 years agofix html of default error message
Mischa POSLAWSKY [Sat, 31 Mar 2007 02:35:08 +0000 (04:35 +0200)]
fix html of default error message

Remove unclosed and useless tag; consistent tag capitalization.

17 years agoreindent remaining 4-space+tab@8 code
Mischa POSLAWSKY [Sat, 31 Mar 2007 02:31:20 +0000 (04:31 +0200)]
reindent remaining 4-space+tab@8 code

Use only tabs for indenting, spaces for alignment.

17 years agotiny speedup decoding + in DecodeURI()
Mischa POSLAWSKY [Sat, 31 Mar 2007 02:08:21 +0000 (04:08 +0200)]
tiny speedup decoding + in DecodeURI()

17 years agov3.19 release 3.19
Mischa POSLAWSKY [Thu, 15 Sep 2005 19:10:40 +0000 (21:10 +0200)]
v3.19 release

17 years agominor code cleanups and clarifications
Mischa POSLAWSKY [Sat, 31 Mar 2007 01:43:13 +0000 (03:43 +0200)]
minor code cleanups and clarifications

17 years agocommon argument handling in functions
Mischa POSLAWSKY [Sat, 31 Mar 2007 01:13:23 +0000 (03:13 +0200)]
common argument handling in functions

Slightly cleaner and faster, and accepts read-only values in all functions.

17 years agochange code indenting to tabs
Mischa POSLAWSKY [Sat, 31 Mar 2007 01:08:27 +0000 (03:08 +0200)]
change code indenting to tabs

17 years agoremove undocumented function HiddenFields()
Mischa POSLAWSKY [Sat, 31 Mar 2007 01:01:39 +0000 (03:01 +0200)]
remove undocumented function HiddenFields()

17 years agoadd tests for all quoting functions
Mischa POSLAWSKY [Sat, 31 Mar 2007 00:59:40 +0000 (02:59 +0200)]
add tests for all quoting functions

17 years agoupdate text dump of documentation
Mischa POSLAWSKY [Sat, 31 Mar 2007 00:58:25 +0000 (02:58 +0200)]
update text dump of documentation

README regenerated from PLP.pm pod.

17 years agomakefile cleanup
Mischa POSLAWSKY [Sat, 31 Mar 2007 00:56:44 +0000 (02:56 +0200)]
makefile cleanup

Also drops perl <5.5 support, since PLP requires 5.6 anyway.

17 years agomodule Cwd not used in PLP; don't use
Mischa POSLAWSKY [Sat, 31 Mar 2007 00:53:52 +0000 (02:53 +0200)]
module Cwd not used in PLP; don't use

17 years agodocument caveats for quoting functions; fix documentation indenting/wrapping.
Mischa POSLAWSKY [Sat, 31 Mar 2007 00:52:19 +0000 (02:52 +0200)]
document caveats for quoting functions; fix documentation indenting/wrapping.

17 years agofix header sending for tied printing
Mischa POSLAWSKY [Sat, 31 Mar 2007 00:45:07 +0000 (02:45 +0200)]
fix header sending for tied printing

Headers were not sent on initial printf or print with empty first argument.

plp.tieprint.patch by Shiar 2002-08-21 18:54:45

17 years agonew maintainer: shiar
Mischa POSLAWSKY [Sat, 31 Mar 2007 00:41:17 +0000 (02:41 +0200)]
new maintainer: shiar

17 years agov3.18 release 3.18
Juerd Waalboer [Fri, 18 Oct 2002 18:37:35 +0000 (18:37 +0000)]
v3.18 release

17 years agoextend howto
Juerd Waalboer [Sat, 31 Mar 2007 00:35:23 +0000 (02:35 +0200)]
extend howto

Explain basic http authentication. Mention SQLite.

17 years agocleanup (minor things like punctuation, use spaces for docu indenting)
Juerd Waalboer [Sat, 31 Mar 2007 00:33:29 +0000 (02:33 +0200)]
cleanup (minor things like punctuation, use spaces for docu indenting)

17 years agooptional end tag for plp code
Juerd Waalboer [Sat, 31 Mar 2007 00:27:44 +0000 (02:27 +0200)]
optional end tag for plp code

17 years agofix header key conversion to match documentation
Juerd Waalboer [Sat, 31 Mar 2007 00:26:19 +0000 (02:26 +0200)]
fix header key conversion to match documentation

Really convert Content_Type to content-type.

17 years agov3.17 release 3.17
Juerd Waalboer [Thu, 22 Aug 2002 13:06:02 +0000 (13:06 +0000)]
v3.17 release

- More cleanups
- %get is now built on script start, no longer on first access
- Apache->request->print is used now under mod_perl, not print (faster)
- Small documentation fixes
- Setting a header when headers are already sent now tells you where output
  started
- Speedup in source()

17 years agov3.16 release 3.16
Juerd Waalboer [Sat, 1 Jun 2002 13:41:39 +0000 (13:41 +0000)]
v3.16 release

17 years agodisable Safe.pm implementation
Juerd Waalboer [Sat, 31 Mar 2007 00:20:18 +0000 (02:20 +0200)]
disable Safe.pm implementation

Leave commented out for future reregard.

17 years agocode comment cleanup addendum
Juerd Waalboer [Sat, 31 Mar 2007 00:17:51 +0000 (02:17 +0200)]
code comment cleanup addendum

17 years agouse relative paths in compile-time includes
Juerd Waalboer [Sat, 31 Mar 2007 00:17:09 +0000 (02:17 +0200)]
use relative paths in compile-time includes

17 years agoSafe.pm implementation
Juerd Waalboer [Sat, 31 Mar 2007 00:16:02 +0000 (02:16 +0200)]
Safe.pm implementation

17 years agocode cleanup (mainly improving comments)
Juerd Waalboer [Sat, 31 Mar 2007 00:11:22 +0000 (02:11 +0200)]
code cleanup (mainly improving comments)

17 years agoupdate author's email address
Juerd Waalboer [Sat, 31 Mar 2007 00:04:10 +0000 (02:04 +0200)]
update author's email address

17 years agoadded howto documentation
Juerd Waalboer [Sat, 31 Mar 2007 00:01:22 +0000 (02:01 +0200)]
added howto documentation

17 years agov3.15 release 3.15
Juerd Waalboer [Tue, 21 May 2002 12:26:08 +0000 (12:26 +0000)]
v3.15 release

- Added caching of scripts. This means using more memory but it also means
  executing scripts 45-65% faster! (mod_perl only)
- Added configurability of caching: PerlSetVar PLPcache On/Off (Default: On)
- Changed PLP.pm to use File::Basename and File::Spec
- Added recursion protection for compile-time includes (fixed max depth: 128)

17 years agov3.14 release 3.14
Juerd Waalboer [Mon, 20 May 2002 14:10:29 +0000 (14:10 +0000)]
v3.14 release

17 years agoplp.vim update
Juerd Waalboer [Fri, 30 Mar 2007 23:55:17 +0000 (01:55 +0200)]
plp.vim update

17 years agosmall documentation changes
Juerd Waalboer [Fri, 30 Mar 2007 23:54:45 +0000 (01:54 +0200)]
small documentation changes

17 years agov3.13 release 3.13
Juerd Waalboer [Sun, 19 May 2002 23:42:06 +0000 (23:42 +0000)]
v3.13 release

17 years agov3.12 release 3.12
Juerd Waalboer [Sat, 18 May 2002 19:15:54 +0000 (19:15 +0000)]
v3.12 release

17 years agofixed strict-violation in PLP.pm that happened only without mod_perl
Juerd Waalboer [Fri, 30 Mar 2007 23:46:25 +0000 (01:46 +0200)]
fixed strict-violation in PLP.pm that happened only without mod_perl

17 years agov3.11 release 3.11
Juerd Waalboer [Sat, 18 May 2002 16:18:29 +0000 (16:18 +0000)]
v3.11 release

17 years agofixed all tie-stuff by reverting a change
Juerd Waalboer [Fri, 30 Mar 2007 23:41:43 +0000 (01:41 +0200)]
fixed all tie-stuff by reverting a change

Symbol.pm's delete_package doesn't delete a package in the way I thought it did.

17 years agocheckin v3.10 3.10
Juerd Waalboer [Sat, 18 May 2002 00:35:58 +0000 (00:35 +0000)]
checkin v3.10

16 years agov3.06 release 3.06
Juerd Waalboer [Tue, 23 Apr 2002 06:19:52 +0000 (06:19 +0000)]
v3.06 release

16 years agov3.05 release
Juerd Waalboer [Fri, 12 Apr 2002 07:07:23 +0000 (07:07 +0000)]
v3.05 release

16 years agov3.04 release
Juerd Waalboer [Thu, 11 Apr 2002 11:18:13 +0000 (11:18 +0000)]
v3.04 release

16 years agov3.03 release
Juerd Waalboer [Thu, 11 Apr 2002 09:05:09 +0000 (09:05 +0000)]
v3.03 release

16 years agov3.02 release
Juerd Waalboer [Thu, 11 Apr 2002 08:57:15 +0000 (08:57 +0000)]
v3.02 release

16 years agov3.01 release
Juerd Waalboer [Wed, 10 Apr 2002 07:50:25 +0000 (07:50 +0000)]
v3.01 release

16 years agov3.00 release 3.00
Juerd Waalboer [Tue, 9 Apr 2002 20:06:55 +0000 (20:06 +0000)]
v3.00 release

16 years agov2.40 release
Juerd Waalboer [Tue, 1 Jan 2002 13:29:37 +0000 (13:29 +0000)]
v2.40 release

16 years agov2.22 release
Juerd Waalboer [Wed, 2 May 2001 11:28:05 +0000 (11:28 +0000)]
v2.22 release

16 years agov2.21 release
Juerd Waalboer [Tue, 1 May 2001 08:00:24 +0000 (08:00 +0000)]
v2.21 release

16 years agov2.01 release 2.01
Juerd Waalboer [Sun, 7 Jan 2001 12:24:21 +0000 (12:24 +0000)]
v2.01 release