slightly less useless error on lack of variable
[scpubgit/DKit.git] / lib / DX / FactRef.pm
1 package DX::FactRef;
2
3 use Moo;
4
5 with 'DX::Role::Ref';
6
7 has fact_type => (is => 'ro', required => 1);
8 has fact_id => (is => 'ro', required => 1);
9
10 sub resolve {
11   my ($self, $state) = @_;
12   $state->facts->{$self->fact_type}->get($self->fact_id);
13 }
14
15 1;