1 package CatalystX::HelpText::Finder::TemplateToolkit::Regexp;
3 use List::MoreUtils qw/ uniq /;
4 use namespace::autoclean;
6 sub find_helptext_keys_in_fn {
8 open(my $FILE, '<', $fn) or warn "Can't open $fn\n" && return;
10 while (my $line = <$FILE>) {
11 foreach my $key ($line =~ m/help_text\(\s*['"](\w+)['"]\s*\)/g) {
16 return [ uniq @keys ];
19 __PACKAGE__->meta->make_immutable;
26 CatalystX::HelpText::Finder::TemplateToolkit::Regexp
30 Find helptext keys parsing the templates using a regular expression, it helps to find
31 helptext keys which are not called by a simple TT parsing due logical conditions
37 =item L<CatalystX::HelpText>
43 Toomas Doran, C<< t0m at state51.co.uk >>
45 Cinxgler Mariaca Minda, C<< cinxgler at ci-info.com >>
49 Copyright Oscar Music and Media 2011.
53 This sofware is free software, and is licensed under the same terms as perl itself.