5 has next => (is => 'ro');
10 my ($self, @but) = @_;
11 $self->new(%$self, @but);
15 my ($self, $state, %spec) = @_;
17 foreach my $key (keys %spec) {
18 ($state, $args{$key}) = $self->_expand_argspec($state, $spec{$key});
20 return $state->expand_vars(%args);
24 my ($self, $state, $spec) = @_;
26 ($state->has_scope_var($spec)
27 ? ($state, $state->scope_var($spec))
28 : (map { $_, $_->scope_var($spec) } $state->assign_vars($spec => {})));
29 } elsif (ref($spec) eq 'ARRAY') {
30 if ($spec->[0] eq 'value') {
31 ($state, +{ bound_value => $spec->[1] });
33 die "Arrayref in argspec is not value";
35 } elsif (ref($spec) eq 'SCALAR' or ref($spec) eq 'REF') {
36 return ($state, +{ bound_value => $$spec });
38 die "Argspec incomprehensible";