1 package CatalystX::GlobalContext;
7 use Scalar::Util 'weaken';
10 our @EXPORT_OK = '$c';
14 CatalystX::GlobalContext - Export Catalyst Context
22 our $VERSION = '0.01';
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> is for helping
47 you run legacy mod_perl code in L<Catalyst>.
49 You save a copy of $c somewhere at the beginning of the request cycle, and it is
50 then accessible through an export where you need it.
52 You can then rip out Apache:: type things, and replace them with things based on
55 What we really need is a set of Apache:: compatibility classes, but that doesn't
58 DO NOT USE THIS MODULE IN NEW CODE
62 =head2 CatalystX::GlobalContext->set_context($c)
64 Saves a weakened reference to the Catalyst context,
65 which is accessible from other modules as an export.
76 Rafael Kitover, C<< <rkitover at cpan.org> >>
80 Please report any bugs or feature requests to C<bug-catalyst-controller-wrapcgi
81 at rt.cpan.org>, or through the web interface at
82 L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Catalyst-Controller-WrapCGI>.
83 I will be notified, and then you'll automatically be notified of progress on
84 your bug as I make changes.
92 =item * RT: CPAN's request tracker
94 L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Catalyst-Controller-WrapCGI>
96 =item * AnnoCPAN: Annotated CPAN documentation
98 L<http://annocpan.org/dist/Catalyst-Controller-WrapCGI>
102 L<http://cpanratings.perl.org/d/Catalyst-Controller-WrapCGI>
106 L<http://search.cpan.org/dist/Catalyst-Controller-WrapCGI>
110 =head1 COPYRIGHT & LICENSE
112 Copyright (c) 2008 Rafael Kitover
114 This program is free software; you can redistribute it and/or modify it
115 under the same terms as Perl itself.
119 1; # End of CatalystX::GlobalContext
121 # vim: expandtab shiftwidth=4 ts=4 tw=80: