1 package CatalystX::GlobalContext;
7 use Scalar::Util 'weaken';
10 our @EXPORT_OK = '$c';
14 CatalystX::GlobalContext - Export Catalyst Context
18 our $VERSION = '0.031';
22 package MyApp::Controller::Root;
24 use CatalystX::GlobalContext ();
28 CatalystX::GlobalContext->set_context($c);
32 package Some::Other::Module;
34 use CatalystX::GlobalContext '$c';
42 This module, in combination with L<Catalyst::Controller::WrapCGI> or
43 L<Catalyst::Controller::CGIBin> is for helping you run legacy mod_perl code in
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 C<Apache::> type things, and replace them with things based on
52 What we really need is a set of C<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 L<Catalyst::Controller::CGIBin>, L<Catalyst::Controller::WrapCGI>,
78 Please report any bugs or feature requests to C<bug-catalyst-controller-wrapcgi
79 at rt.cpan.org>, or through the web interface at
80 L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Catalyst-Controller-WrapCGI>.
81 I will be notified, and then you'll automatically be notified of progress on
82 your bug as I make changes.
90 =item * RT: CPAN's request tracker
92 L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Catalyst-Controller-WrapCGI>
94 =item * AnnoCPAN: Annotated CPAN documentation
96 L<http://annocpan.org/dist/Catalyst-Controller-WrapCGI>
100 L<http://cpanratings.perl.org/d/Catalyst-Controller-WrapCGI>
104 L<http://search.cpan.org/dist/Catalyst-Controller-WrapCGI>
110 See L<Catalyst::Controller::WrapCGI/AUTHOR> and
111 L<Catalyst::Controller::WrapCGI/CONTRIBUTORS>.
113 =head1 COPYRIGHT & LICENSE
115 Copyright (c) 2008-2009 L<Catalyst::Controller::WrapCGI/AUTHOR> and
116 L<Catalyst::Controller::WrapCGI/CONTRIBUTORS>.
118 This program is free software; you can redistribute it and/or modify it
119 under the same terms as Perl itself.
123 1; # End of CatalystX::GlobalContext
125 # vim: expandtab shiftwidth=4 ts=4 tw=80: