+NAME
+ CatalystX::HelpText -
+
+DESCRIPTION
+METHODS
+BUGS
+AUTHOR
+ Cinxgler Mariaca Minda,"cinxgler at ci-info.com"
+
+COPYRIGHT
+ Copyright state51.
+
+LICENSE
+ This sofware is free software, and is licensed under the same terms as
+ perl itself.
+
package CatalystX::HelpText::ViewRole;
use Moose::Role;
use Try::Tiny;
+use Moose::Autobox;
+use namespace::autoclean;
requires 'expose_methods';
around expose_methods => sub {
my ($orig, $self, @args) = @_;
- my @m = $self->$orig(@args)->flatten;
- [ @m, 'help_text' ];
+ my $m = $self->$orig(@args) || [];
+ [ $m->flatten, 'help_text' ];
};
sub help_text {
# your actions replace this one
sub main : Chained('base') PathPart('') Args(0) {
- my ($self, $ctx) = @_;
- $ctx->res->body('<h1>It works</h1>');
}
+sub end : ActionClass('RenderView') {}
+
__PACKAGE__->meta->make_immutable;