1 package CXGN
::Trial
::TrialLookup
;
5 CXGN::Trial::TrialLookup - a module to lookup geolocations by name.
10 my $trial_lookup = CXGN::Trial::TrialLookup->new({ schema => $schema, trial_name => $trial_name} );
15 Looks up trials ("Project::Project") by name. Provides the Project::Project object when a trial name matches.
19 Jeremy D. Edwards (jde22@cornell.edu)
24 use MooseX
::FollowPBP
;
25 use Moose
::Util
::TypeConstraints
;
30 isa
=> 'DBIx::Class::Schema',
33 has
'trial_name' => (isa
=> 'Str', is
=> 'rw', predicate
=> 'has_trial_name', clearer
=> 'clear_trial_name');
37 my $schema = $self->get_schema();
39 if (!$self->has_trial_name()){
42 my $trial_name = $self->get_trial_name;
43 $trial = $schema->resultset("Project::Project")
48 print STDERR
"The trial $trial_name was not found\n";