1 package CatalystX::GlobalContext;
7 use Scalar::Util 'weaken';
11 CatalystX::GlobalContext - Export Catalyst Context
19 our $VERSION = '0.01';
23 package MyApp::Controller::Root;
25 use CatalystX::GlobalContext ();
29 CatalystX::GlobalContext->set_context($c);
33 package Some::Other::Module;
35 use CatalystX::GlobalContext '$c';
43 This module, in combination with L<Catalyst::Controller::WrapCGI> is for helping
44 you run legacy mod_perl code in L<Catalyst>.
46 You save a copy of $c somewhere at the beginning of the request cycle, and it is
47 then accessible through an export where you need it.
49 You can then rip out Apache:: type things, and replace them with things based on
52 What we really need is a set of Apache:: compatibility classes, but that doesn't
55 DO NOT USE THIS MODULE IN NEW CODE
59 =head2 CatalystX::GlobalContext->set_context($c)
61 Saves a weakened reference to the Catalyst context,
62 which is accessible from other modules as an export.
73 Rafael Kitover, C<< <rkitover at cpan.org> >>
77 Please report any bugs or feature requests to C<bug-catalyst-controller-wrapcgi
78 at rt.cpan.org>, or through the web interface at
79 L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Catalyst-Controller-WrapCGI>.
80 I will be notified, and then you'll automatically be notified of progress on
81 your bug as I make changes.
89 =item * RT: CPAN's request tracker
91 L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Catalyst-Controller-WrapCGI>
93 =item * AnnoCPAN: Annotated CPAN documentation
95 L<http://annocpan.org/dist/Catalyst-Controller-WrapCGI>
99 L<http://cpanratings.perl.org/d/Catalyst-Controller-WrapCGI>
103 L<http://search.cpan.org/dist/Catalyst-Controller-WrapCGI>
107 =head1 COPYRIGHT & LICENSE
109 Copyright (c) 2008 Rafael Kitover
111 This program is free software; you can redistribute it and/or modify it
112 under the same terms as Perl itself.
116 1; # End of CatalystX::GlobalContext
118 # vim: expandtab shiftwidth=4 ts=4 tw=80: