CatalystX::GlobalContext - Export Catalyst Context


NAME

CatalystX::GlobalContext - Export Catalyst Context


VERSION

Version 0.024


SYNOPSIS

    package MyApp::Controller::Root;
    use CatalystX::GlobalContext ();
    sub auto {
        my ($self, $c) = @_;
        CatalystX::GlobalContext->set_context($c);        
        1;
    }
    
    package Some::Other::Module;
    use CatalystX::GlobalContext '$c';
    ...
    do stuff with $c
    ...


DESCRIPTION

This module, in combination with the Catalyst::Controller::WrapCGI manpage or the Catalyst::Controller::CGIBin manpage 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.

What we really need is a set of Apache:: compatibility classes, but that doesn't exist yet.

DO NOT USE THIS MODULE IN NEW CODE


CLASS METHODS

CatalystX::GlobalContext->set_context($c)

Saves a weakened reference to the Catalyst context, which is accessible from other modules as an export.


SEE ALSO

the Catalyst::Controller::CGIBin manpage, the Catalyst::Controller::WrapCGI manpage, Catalyst


BUGS

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. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.


SUPPORT

More information at:


AUTHOR

See AUTHOR in the Catalyst::Controller::WrapCGI manpage and CONTRIBUTORS in the Catalyst::Controller::WrapCGI manpage.


COPYRIGHT & LICENSE

Copyright (c) 2008-2009 AUTHOR in the Catalyst::Controller::WrapCGI manpage and CONTRIBUTORS in the Catalyst::Controller::WrapCGI manpage.

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

 CatalystX::GlobalContext - Export Catalyst Context