1 package CatalystX::HelpText::Finder::TemplateToolkit;
3 use List::MoreUtils qw/ uniq /;
5 use namespace::autoclean;
7 sub find_helptext_keys_in_fn {
8 my ($self, $fn, $script) = @_;
10 my $t = Template->new({
11 INCLUDE_PATH => [ $script->template_search_dir ],
15 $t->process($fn, { help_text => sub { push @keys, shift } }, \$out);
16 return [ uniq @keys ];
19 __PACKAGE__->meta->make_immutable;