From: Matt S Trout Date: Wed, 19 Feb 2014 21:07:02 +0000 (+0000) Subject: slightly less useless error on lack of variable X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e09f23e1129cc9cce11248a45c833795d1079b2f;p=scpubgit%2FDKit.git slightly less useless error on lack of variable --- diff --git a/lib/DX/State.pm b/lib/DX/State.pm index b75a39d..899c0d9 100644 --- a/lib/DX/State.pm +++ b/lib/DX/State.pm @@ -29,7 +29,9 @@ has actions => (is => 'ro', default => sub { {} }); sub scope_var { my ($self, $name) = @_; - $self->by_id->{$self->scope->{$name}}; + my $id = $self->scope->{$name} + or die "no such variable in scope: $name"; + $self->by_id->{$id}; } sub resolve_value {