Hi all... I'm trying to put the finishing touches on
Apache::UploadMeter, but am running into a minor problem. Due to the
complexity of the configuration, I'm trying to use the
Apache::ReadConfig namespace from mod_perl_start.pl to dynamically
configure the upload-meter (by setting some variables in the
Apache::UploadMeter namespace and then calling a configure() routine).
Enclosed is the configure() subroutine. It runs fine, but doesn't seem
to be tying the handlers properly. Any advice would be helpful. Also,
if anyone know how I could dynamicly add handlers to the stack directly
from the Apache::ReadConfig namespace without knowing in advance what
other handlers are enabled for a given Location, that would be helpful...
Issac
sub configure()
{
my $namespace=__PACKAGE__;
my
($UploadScript,$UploadMeter,$UploadForm)=(_conf("UploadScript"),_conf("UploadMeter"),_conf("UploadForm"));
warn "Config $UploadScript - $UploadMeter - $UploadForm - in
namespace $namespace" if (_conf("DEBUG")>1);
package Apache::ReadConfig;
no strict;
$Location{$UploadScript} = {
SetHandler => 'perl-script',
Options => '+ExecCGI',
#PerlHeaderParserHandler => $namespace."::u_handler",
#PerlFixupHandler => $namespace."::ufu_handler",
PerlHeaderParserHandler => $namespace."::jit_upload",
};
$Location{$UploadMeter} = {
SetHandler => 'perl-script',
Options => '+ExecCGI',
#PerlHandler => $namespace."::um_handler",
PerlHeaderParserHandler => $namespace."::jit_meter",
};
$Location{$UploadForm} = {
Options => '+ExecCGI',
SetHandler => 'perl-script',
#PerlFixupHandler => $namespace."::s_h",
#PerlTransHandler => $namespace."::uf_handler",
PerlHandler => $namespace,
PerlInitHandler => $namespace."::s_h",
};
return 1;
}
sub _conf($)
{
my $arg=shift;
warn ("Extracting $arg...".eval("\$".__PACKAGE__."::".$arg)) if
(eval("\$".__PACKAGE__."::DEBUG > 1"));
return eval("\$".__PACKAGE__."::".$arg);
}
--
Internet is a wonderful mechanism for making a fool of
yourself in front of a very large audience.
--Anonymous
Moving the mouse won't get you into trouble... Clicking it might.
--Anonymous
PGP Key 0xE0FA561B - Fingerprint:
7E18 C018 D623 A57B 7F37 D902 8C84 7675 E0FA 561B