| 1 | package WWW::MenuGrinder::Plugin::NullLoader; | ||
| 2 | BEGIN { | ||
| 3 | $WWW::MenuGrinder::Plugin::NullLoader::VERSION = '0.06'; | ||
| 4 | } | ||
| 5 | |||
| 6 | # ABSTRACT: WWW::MenuGrinder Plugin that loads from the config. | ||
| 7 | |||
| 8 | use Moose; | ||
| 9 | |||
| 10 | with 'WWW::MenuGrinder::Role::Loader'; | ||
| 11 | |||
| 12 | sub load { | ||
| 13 | my ($self) = @_; | ||
| 14 | |||
| 15 | if (! defined $self->grinder->config->{menu}) { | ||
| 16 | die "config->{menu} is required"; | ||
| 17 | } else { | ||
| 18 | return $self->grinder->config->{menu} | ||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 | __PACKAGE__->meta->make_immutable; | ||
| 23 | |||
| 24 | no Moose; | ||
| 25 | 1; | ||
| 26 | |||
| 27 | |||
| 28 | __END__ |