blob: ec252c1929bce568ab4596ee5c6e6322e38ca4c0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package presque::worker::Role::Context;
use YAML;
use Moose::Role;
use Moose::Util::TypeConstraints;
subtype 'Context' => as 'HashRef';
coerce 'Context' => from 'Str' => via { YAML::LoadFile $_; };
has context => (
is => 'rw',
isa => 'Context',
lazy => 1,
coerce => 1,
default => sub {{}},
);
1;
|