Since the module you're referring to isn't a mod_perl handler, I assume you have a script that uses this module, and the error is occuring in that script. An error in Apache::Request suggest that this script is running under Apache::Registry. Hard to tell what's wrong without seeing some code, but a shot in the dark: your script is shifting what it believes are command line arguments, under mod_perl this will retrieve a reference to the request object, maybe not what you expect. | [reply] [d/l] |
you can check the code for my module under this node. Apart from some small changes (dumb stuff like returning my $class instead of $self) it's pretty much the same.
The script I'm calling it from is stripped back to:
#!/usr/bin/perl -w
use lib '/home/iordy/perl.iordy.net';
use strict;
use iXML::TheConstruct;
use Apache::Request;
my $r = Apache->request;
my $apr = Apache::Request->new($r);
my $construct = iXML::TheConstruct->new();
regardless of where I have 'my $r = Apache->request;' it tells me It cannot find the method "new()" under module Apache::Request;.
now I have written stuff (1 or 2 things only; I'm new to perl) in this manner before but I have never done it with a module I have written myself (the module shown in the node listed above is my first ever attempt.)
so I'm stumped as to why this would be happening. | [reply] [d/l] |
Is libapreq installed? That's where the Apache::Request object comes from. If you don't need its extended features, you can just use $r which is usually enough.
BTW, you can write:
my $r = shift;
instead of
my $r = Apache->request;
| [reply] [d/l] [select] |
I have seen Apache balk/fail/die while loading an external module that conflicted with one of it's own modules in any way shape or form.. Dont know how you would test this theory without unloading one mod_* at a time, reloading apache and trying again. then as they say lather rinse repeat. | [reply] |