Ended up modifying his Apache::Singleton::Request module to work with my
app. Was really just a matter of getting rid of the MP1 code and changing
the requestutils to requestrecs. In any case, everything finally works ( I
think ). Thanks for all the help. I really appreciate it. --JAK
On 9/24/
Yep, that's a bug
perldoc Apache2::RequestUtil
# get the global request object (requires PerlOptions +GlobalRequest)
$r = Apache2::RequestUtil->request;
which means u need GlobalRequest in apache config, which I'm not a big fan
of. Better raise a bug in cpan rt for this module and get Tatsuh
I looked at the source. It does seem to be written for both. My
understanding was that everything for apache2 was supposed to be in the
Apach2:: namespace. In any case I posted the install error below. Does an
environment variable need to be set?
perl Makefile.PL
Warning: prerequisite mod_per
AFAIK Apache::Singleton works for MP2, also it does both per request and per
process singletons.
On 9/24/07, jk jk <[EMAIL PROTECTED]> wrote:
>
> I've been trying to use Apache::Singleton::Request under the assumption
> that you're right about Class::Singleton being the crux of the issue.
> Unfor
On 9/23/07, jk jk <[EMAIL PROTECTED]> wrote:
> It was my impression that the most direct method of porting would be to use
> Class::Singleton (Apache::Singleton::Request).
It would be, but Apache::Singleton::Request is different from
Class::Singleton in that it stores the instance in $r->pnotes in
I'm trying to port a pre-existing application built using a singleton
design. Various class instances use a __PACKAGE__::getInstance() method to
get a handle on the current request's instance. getInstance just returns
$self which is a global variable. This works as a cgi, since every request
is
On 9/23/07, jk jk <[EMAIL PROTECTED]> wrote:
> I've been trying to use Apache::Singleton::Request under the assumption that
> you're right about Class::Singleton being the crux of the issue.
> Unfortunately, I can't get it working under Apache2. Is there a different
> module for mp2/apache2 ?
It
I've been trying to use Apache::Singleton::Request under the assumption that
you're right about Class::Singleton being the crux of the issue.
Unfortunately, I can't get it working under Apache2. Is there a different
module for mp2/apache2 ? Thanks for your patience. --JAK
On 9/23/07, jk jk <[EMA
Why is that? Class::Singleton is modperl compatible, Apache::Singleton is
the same thing with a few more features. Its purpose to simplify singleton
application creation. My understanding was it would only allow a single
instance of the object to be created for each request, not forever. Please
jk jk wrote:
> I'm trying to port a preexisting CGI app to mod_perl2 and could use some
> help.
>
> Here goes a test case that should illustrate my problem:
>
> The code pasted below loads the page properly the first time it's
> accessed. However, upon multiple reloads in firefox, the headers ei
I spoke too soon. While the header issue appears to be resolved, a new one
has surfaced. The first 20 or so reloads (the number of spare servers?) are
ok, but after that nothing loads in the browser and the error pasted below
appears in the error_log. Any ideas? Thanks. --JAK
Welp, changing over to ModPerl::RegistryPrefork did the trick. Thanks for
the advice. I really appreciate it. --JAK
On 9/22/07, jk jk <[EMAIL PROTECTED]> wrote:
>
> My question would then be, in which situation would I be using an old one
> on a later request? I suspect this may be the case, s
On 9/21/07, jk jk <[EMAIL PROTECTED]> wrote:
> sub printme{
>
> my ( $self, $args ) = @_;
>
> my $r = Apache2::RequestUtil->request;
>
> $self->{r}->content_type('text/html');
>
> print "A Page of Rendered HTML\n";
> }
You ask for $r from Apache2::RequestUtil here, but then you don
As a Registry script, it does get it. I've made sure of that by using
Data::Dumper to take a look.
Thanks. --JAK
On 9/22/07, André Warnier <[EMAIL PROTECTED]> wrote:
>
> jk jk wrote:
> [..]
> >> my $r = shift;
>
> One of the brighter lights on this list correct me if I'm wrong, but I
> think the
jk jk wrote:
[..]
my $r = shift;
One of the brighter lights on this list correct me if I'm wrong, but I
think there's some basic confusion here.
This is a cgi-bin script, it is not an Apache/mod_perl module executed
as a mod_perl handler.
Thus it does not get a "request object" as argument
I should have also noted that I'm using ModPerl2, Apache2, It's running
under Registry, and keep-alive if off. Thanks again. --JAK
On 9/21/07, jk jk <[EMAIL PROTECTED]> wrote:
>
> I'm trying to port a preexisting CGI app to mod_perl2 and could use some
> help.
>
> Here goes a test case that should
I'm trying to port a preexisting CGI app to mod_perl2 and could use some
help.
Here goes a test case that should illustrate my problem:
The code pasted below loads the page properly the first time it's accessed.
However, upon multiple reloads in firefox, the headers either disappear
altogether or
17 matches
Mail list logo