On Thu, Jan 11, 2001 at 10:18:30PM -0800, [EMAIL PROTECTED] wrote:
> thanks for your contribution, however, Apache::Registry is not accepting
> any new features. have a look at Apache::{PerlRun,RegistryNG,RegistryBB}
> new features should fit in here or be in its own subclass. i don't think
> the $Apache::Registry::Debug functionality was ever carried over.
BTW, what about a small deviation that allows one to write handler style
CGI scripts that do not have these nasty closure style problems that
registry scripts have due to wrapping the handler around it? I use the
following to prototype my perl content handlers by adding something like
that to my httpd.conf:
<Files *.ph>
SetHandler perl-script
PerlHandler RegistryHandler
Options ExecCGI
</Files>
And RegistryHandler is then like that:
#!/usr/local/bin/perl -w
# $Id: RegistryHandler.pm,v 1.1 2001/01/05 23:16:18 jum Exp $
# This is an unpublished work copyright (c) 2000 HELIOS Software GmbH
# 30827 Garbsen, Germany
package RegistryHandler;
use strict;
use Apache::Constants qw(:common);
use Apache::RegistryNG ();
use vars qw($VERSION @ISA);
$VERSION = (qw$Revision: 1.1 $ )[-1];
@ISA = qw(Apache::RegistryNG);
sub sub_wrap {
my($pr, $code, $package) = @_;
$code ||= $pr->{'code'};
$package ||= $pr->{'namespace'};
my $line = $pr->mark_line;
my $sub = join(
'',
'package ',
$package,
';',
$line,
$$code,
"\n",
);
$pr->{'sub'} = \$sub;
}
1;
That way I can try my perl content handlers by just commenting out the
package statement just like ordinary perl scripts.
--
Jens-Uwe Mager
HELIOS Software GmbH
Steinriede 3
30827 Garbsen
Germany
Phone: +49 5131 709320
FAX: +49 5131 709325
Internet: [EMAIL PROTECTED]