1 package CatalystX::HelpText::File;
3 use MooseX::Types::Moose qw/Str/;
6 use namespace::autoclean;
8 has help_files_path => (
11 default => '/support/help/',
14 has help_files_ext => (
20 sub get_help_text_for {
21 my ($self, $c, $help_key) = @_;
22 confess('No $c provided') unless $c;
23 confess('No $help_key provided') unless $help_key;
25 my $file_path = $c->path_to('root', $self->help_files_path.$help_key.$self->help_files_ext);
27 if ( -e $file_path ) {
29 open FILE, $file_path or confess "Couldn't open file: $!";