Catalyst-Controller-WrapCGI

 view release on metacpan or  search on metacpan

lib/CatalystX/GlobalContext.pm  view on Meta::CPAN

package CatalystX::GlobalContext;
our $AUTHORITY = 'cpan:RKITOVER';
$CatalystX::GlobalContext::VERSION = '0.039';
use strict;
use warnings;
use parent 'Exporter';

use Scalar::Util 'weaken';

use vars '$c';
our @EXPORT_OK = '$c';

=head1 NAME

CatalystX::GlobalContext - Export Catalyst Context

=head1 SYNOPSIS

lib/CatalystX/GlobalContext.pm  view on Meta::CPAN

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 C<Apache::> type things, and replace them with things based on
C<$c>.

=head1 CLASS METHODS

=head2 CatalystX::GlobalContext->set_context($c)

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

=cut

sub set_context {
    $c = $_[1];
    weaken $c;
}

=head1 SEE ALSO

L<Catalyst::Controller::CGIBin>, L<Catalyst::Controller::WrapCGI>,
L<Catalyst>

=head1 BUGS

Please report any bugs or feature requests to C<bug-catalyst-controller-wrapcgi



( run in 0.328 second using v1.01-cache-2.11-cpan-65fba6d93b7 )