Here is the code that I cant' get working, maybe it is easier to just
correct what I have so far...
package Test::One;
use strict;
use Apache::Constants qw(:common);
use Apache::Singleton::Request;
use base qw(Apache::Singleton::Request);
use vars qw($r);
my $var1 = "test";
sub handler {
$r = shift;
print_header();
init();
return OK;
}
sub print_header{
$r->send_http_header('text/html');
}
sub init{
&testing::test;
}
package testing;
sub test {
my $test = Test::One->instance();
print $test->{var1};
}
1;
----- Original Message -----
From: "Chris Ochs" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 16, 2003 1:22 PM
Subject: Apache::Singleton
>
>
> Hmmm after playing around with Apache::Singleton I am having a hard time
> understanding exactly how you use it. I failed to find even one complete
> example of it's use, just bits and pieces, and I'm afraid I don't
> understand
> how it all fits together. I read the Class::Singleton manpage and that
> didnt' help me either. Anyone have an example lying around or a link to
> one?
>
>
> --
> Reporting bugs: http://perl.apache.org/bugs/
> Mail list info: http://perl.apache.org/maillist/modperl.html
>
>
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html