CGI-Lazy-ModPerl

 view release on metacpan or  search on metacpan

lib/CGI/Lazy/ModPerl.pm  view on Meta::CPAN


1

__END__

=head1 LEGAL

#===========================================================================

Copyright (C) 2008 by Nik Ogura. All rights reserved.

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.

Bug reports and comments to nik.ogura@gmail.com. 

#===========================================================================

=head1 NAME

CGI::Lazy::ModPerl

=head1 SYNOPSIS

	use CGI::Lazy;

	our $q = CGI::Lazy->new({

					tmplDir 	=> "/templates",

					jsDir		=>  "/js",

					plugins 	=> {

						mod_perl => {

							PerlHandler 	=> "ModPerl::Registry",

							saveOnCleanup	=> 1,

						},

						ajax	=>  1,

						dbh 	=> {

							dbDatasource 	=> "dbi:mysql:somedatabase:localhost",

							dbUser 		=> "dbuser",

							dbPasswd 	=> "letmein",

							dbArgs 		=> {"RaiseError" => 1},

						},

						session	=> {

							sessionTable	=> 'SessionData',

							sessionCookie	=> 'frobnostication',

							saveOnDestroy	=> 1,

							expires		=> '+15m',

						},

					},

				});

=head1 DESCRIPTION

Module for handling the wierdness that entails when you move from normal cgi scripting into the wonderful world of mod_perl.

The mod_perl object needs to know which response handler is being used.  This is a manditory argument.

Sessions are saved in a cleanup handler by default, as well as when the Lazy object is destroyed.  (call me paranoid)  If you wish to disable the mod_perl handler save, set saveOnCleanup => 0.  If it's not set, it's the same as if it was set to 1.

=head1 METHODS

=head2 _sessionCleanup

Mod_perl cleanup handler for saving session data.  Called automatically if using both mod_perl and session plugins.

=head2 new ( q )

Constructor.

=head3 q

CGI::Lazy object

=head2 vars ()

Returns mod_perl object settings from config.

=cut



( run in 0.809 second using v1.01-cache-2.11-cpan-7fcb06a456a )