CatalystX::GlobalContext - Export Catalyst Context
package MyApp::Controller::Root; use CatalystX::GlobalContext (); sub auto : Private { my ($self, $c) = @_; CatalystX::GlobalContext->set_context($c); 1; } package Some::Other::Module; use CatalystX::GlobalContext '$c'; ... do stuff with $c ...
This module, in combination with Catalyst::Controller::WrapCGI or Catalyst::Controller::CGIBin is for helping you run legacy mod_perl code in Catalyst.
You save a copy of $c somewhere at the beginning of the request cycle, and it is then accessible through an export where you need it.
You can then rip out Apache:: type things, and replace them with things based on $c.
Apache::
$c
Saves a weakened reference to the Catalyst context, which is accessible from other modules as an export.
Catalyst::Controller::CGIBin, Catalyst::Controller::WrapCGI, Catalyst
Please report any bugs or feature requests to bug-catalyst-controller-wrapcgi at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Catalyst-Controller-WrapCGI. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-catalyst-controller-wrapcgi at rt.cpan.org
Rafael Kitover <rkitover@gmail.com>
Copyright (c) 2008-2015 Rafael Kitover <rkitover@gmail.com> and "CONTRIBUTORS" in Catalyst::Controller::WrapCGI.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Catalyst::Controller::WrapCGI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::Controller::WrapCGI
CPAN shell
perl -MCPAN -e shell install Catalyst::Controller::WrapCGI
For more information on module installation, please visit the detailed CPAN module installation guide.