use utf8;
use Carp qw/croak/;
+BEGIN { require 5.008001; }
+
__PACKAGE__->mk_accessors(
qw/counter request response state action stack namespace stats/
);
if (@_) {
my $stash = @_ > 1 ? {@_} : $_[0];
croak('stash takes a hash or hashref') unless ref $stash;
- while ( my ( $key, $val ) = each %$stash ) {
- $c->{stash}->{$key} = $val;
+ foreach my $key ( keys %$stash ) {
+ $c->{stash}->{$key} = $stash->{$key};
}
}
return $c->{stash};
$comp = $c->_comp_search($name);
return $c->_filter_component( $comp, @_ ) if defined($comp);
-
- croak("Unable to find component $name");
}
return sort keys %{ $c->components };