1 package CatalystX::GlobalContext;
7 use Scalar::Util 'weaken';
10 our @EXPORT_OK = '$c';
14 CatalystX::GlobalContext - Export Catalyst Context
22 our $VERSION = '0.022';
26 package MyApp::Controller::Root;
28 use CatalystX::GlobalContext ();
32 CatalystX::GlobalContext->set_context($c);
36 package Some::Other::Module;
38 use CatalystX::GlobalContext '$c';
46 This module, in combination with L<Catalyst::Controller::WrapCGI> or
47 L<Catalyst::Controller::CGIBin> is for helping you run legacy mod_perl code in
50 You save a copy of $c somewhere at the beginning of the request cycle, and it is
51 then accessible through an export where you need it.
53 You can then rip out C<Apache::> type things, and replace them with things based on
56 What we really need is a set of C<Apache::> compatibility classes, but that doesn't
59 DO NOT USE THIS MODULE IN NEW CODE
63 =head2 CatalystX::GlobalContext->set_context($c)
65 Saves a weakened reference to the Catalyst context,
66 which is accessible from other modules as an export.
77 L<Catalyst::Controller::CGIBin>, L<Catalyst::Controller::WrapCGI>,
82 Please report any bugs or feature requests to C<bug-catalyst-controller-wrapcgi
83 at rt.cpan.org>, or through the web interface at
84 L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Catalyst-Controller-WrapCGI>.
85 I will be notified, and then you'll automatically be notified of progress on
86 your bug as I make changes.
94 =item * RT: CPAN's request tracker
96 L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Catalyst-Controller-WrapCGI>
98 =item * AnnoCPAN: Annotated CPAN documentation
100 L<http://annocpan.org/dist/Catalyst-Controller-WrapCGI>
104 L<http://cpanratings.perl.org/d/Catalyst-Controller-WrapCGI>
108 L<http://search.cpan.org/dist/Catalyst-Controller-WrapCGI>
114 See L<Catalyst::Controller::WrapCGI/AUTHOR> and
115 L<Catalyst::Controller::WrapCGI/CONTRIBUTORS>.
117 =head1 COPYRIGHT & LICENSE
119 Copyright (c) 2008-2009 L<Catalyst::Controller::WrapCGI/AUTHOR> and
120 L<Catalyst::Controller::WrapCGI/CONTRIBUTORS>.
122 This program is free software; you can redistribute it and/or modify it
123 under the same terms as Perl itself.
127 1; # End of CatalystX::GlobalContext
129 # vim: expandtab shiftwidth=4 ts=4 tw=80: