Reaction
view release on metacpan or search on metacpan
lib/Reaction/UI/ViewPort/Field/Role/Choices.pm view on Meta::CPAN
has valid_values => (isa => ArrayRef, is => 'ro', lazy_build => 1);
has value_choices => (isa => ArrayRef, is => 'ro', lazy_build => 1);
has value_map_method => (
isa => Str, is => 'ro', required => 1, default => sub { 'display_name' },
);
sub str_to_ident {
my ($self, $str) = @_;
my $u = URI->new('','http');
$u->query($str);
return ($u->query_keywords ? ($u->query_keywords)[0] : { $u->query_form });
};
sub obj_to_str {
my ($self, $obj) = @_;
return $obj unless ref($obj);
confess "${obj} not an object" unless blessed($obj);
my $ident = $obj->ident_condition; #XXX DBIC ism that needs to go away
my $u = URI->new('', 'http');
$u->query_form(%$ident);
return $u->query;
};
( run in 2.270 seconds using v1.01-cache-2.11-cpan-299005ec8e3 )