Subject: | Apache2ÉεÄàç¦Ü¹ñ©H |
¨¢bÉÈÁĨèÜ·B
ܱÆCPAN.jpÅ·B
½ª±êÅ®Æv¤ÌÅ·ªAǤŵ天H
package Apache::Singleton::Request;
use strict;
use vars qw($VERSION);
$VERSION = '0.01';
use Apache::Singleton;
use base qw(Apache::Singleton);
my $Apache = eval{require Apache;'Apache'}
|| eval{require Apache2;'Apache2'}
|| die();
sub _get_instance {
my $class = shift;
my $r = $Apache->request;
my $key = "apache_singleton_$class";
return $r->pnotes($key);
}
sub _set_instance {
my($class, $instance) = @_;
my $r = $Apache->request;
my $key = "apache_singleton_$class";
$r->pnotes($key => $instance);
}
1;
__END__