CatalystX::GlobalContext - Export Catalyst Context


Catalyst-Controller-WrapCGI documentation  | view source Contained in the Catalyst-Controller-WrapCGI distribution.

Index


NAME

Top

CatalystX::GlobalContext - Export Catalyst Context

SYNOPSIS

Top

    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
    ...

DESCRIPTION

Top

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.

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

Top

CatalystX::GlobalContext->set_context($c)

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

SEE ALSO

Top

Catalyst::Controller::CGIBin, Catalyst::Controller::WrapCGI, Catalyst

BUGS

Top

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.

SUPPORT

Top

More information at:

* RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/Bugs.html?Dist=Catalyst-Controller-WrapCGI

* AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/Catalyst-Controller-WrapCGI

* CPAN Ratings

http://cpanratings.perl.org/d/Catalyst-Controller-WrapCGI

* Search CPAN

http://search.cpan.org/dist/Catalyst-Controller-WrapCGI

AUTHOR

Top

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

COPYRIGHT & LICENSE

Top


Catalyst-Controller-WrapCGI documentation  | view source Contained in the Catalyst-Controller-WrapCGI distribution.