| 1 | package Hopkins::TaskOption; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | |||
| 5 | =head1 NAME | ||
| 6 | |||
| 7 | Hopkins::TaskOption - task object | ||
| 8 | |||
| 9 | =head1 DESCRIPTION | ||
| 10 | |||
| 11 | Hopkins::TaskOption represents a task option. | ||
| 12 | |||
| 13 | =cut | ||
| 14 | |||
| 15 | use base 'Class::Accessor::Fast'; | ||
| 16 | |||
| 17 | use Hopkins::TaskOptionChoices; | ||
| 18 | |||
| 19 | __PACKAGE__->mk_accessors(qw(name type value choices)); | ||
| 20 | |||
| 21 | sub choices | ||
| 22 | { | ||
| 23 | my $self = shift; | ||
| 24 | |||
| 25 | return $self->set(choices => @_) if @_; | ||
| 26 | |||
| 27 | my $choices = $self->get('choices'); | ||
| 28 | |||
| 29 | $choices->fetch if $choices; | ||
| 30 | |||
| 31 | return $choices; | ||
| 32 | } | ||
| 33 | |||
| 34 | =back | ||
| 35 | |||
| 36 | =head1 AUTHOR | ||
| 37 | |||
| 38 | Mike Eldridge <diz@cpan.org> | ||
| 39 | |||
| 40 | =head1 LICENSE | ||
| 41 | |||
| 42 | =cut | ||
| 43 | |||
| 44 | 1; | ||
| 45 |