Ark
view release on metacpan or search on metacpan
lib/Ark/Context.pm view on Meta::CPAN
package Ark::Context;
use Mouse;
use Scalar::Util ();
use Try::Tiny 0.02;
use URI::WithBase;
our $DETACH = 'ARK_DETACH';
our $DEFERRED = 'ARK_DEFERRED';
our $STREAMING = 'ARK_STREAMING';
extends 'Ark::Component';
has request => (
is => 'rw',
isa => 'Object',
required => 1,
);
has response => (
is => 'rw',
isa => 'Ark::Response',
lazy => 1,
default => sub {
Ark::Response->new;
},
);
has app => (
is => 'rw',
isa => 'Ark::Core',
required => 1,
weak_ref => 1,
handles => ['debug', 'log', 'get_actions', 'get_action', 'ensure_class_loaded',
'component', 'controller', 'view', 'model', 'path_to', 'config',
'router',],
);
has stash => (
is => 'rw',
isa => 'HashRef',
lazy => 1,
default => sub { {} },
);
has stack => (
is => 'rw',
isa => 'ArrayRef',
lazy => 1,
default => sub { [] },
);
has state => (
is => 'rw',
default => 0,
);
has error => (
is => 'rw',
isa => 'ArrayRef',
lazy => 1,
default => sub { [] },
);
has [qw/detached finalized/] => (
( run in 2.864 seconds using v1.01-cache-2.11-cpan-75ffa21a3d4 )