File Coverage

blib/lib/File/Findgrep/I18N.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1              
2             package File::Findgrep::I18N;
3             # This is the project base class for "findgrep", an example application
4             # using Locale::Maketext;
5              
6 2     2   2262 use Locale::Maketext 1.01;
  2         28092  
  2         63  
7 2     2   24 use base ('Locale::Maketext');
  2         3  
  2         326  
8              
9             # I decree that this project's first language is English.
10              
11             %Lexicon = (
12             '_AUTO' => 1,
13             # That means that lookup failures can't happen -- if we get as far
14             # as looking for something in this lexicon, and we don't find it,
15             # then automagically set $Lexicon{$key} = $key, before possibly
16             # compiling it.
17            
18             # The exception is keys that start with "_" -- they aren't auto-makeable.
19              
20              
21              
22             '_USAGE_MESSAGE' =>
23             # an example of a phrase whose key isn't meant to ever double
24             # as a lexicon value
25             \q{
26             Usage:
27             findgrep [switches] line-pattern [filename-pattern [dirnames...]]
28             Switches:
29             -R recurse
30             -m123 minimum filesize in bytes (default: 0)
31             -m123K minimum filesize in kilobytes
32             -m123M minimum filesize in megabytes
33             -m123G minimum filesize in gigabytes
34             -M123 maximum filesize in bytes (default: 10 million)
35             -M123K maximum filesize in kilobytes
36             -M123M maximum filesize in megabytes
37             -M123G maximum filesize in gigabytes
38             -h exit, displaying this message
39             -- signal end of switches
40            
41             Line-pattern should be a regexp that matches lines.
42             Filename-pattern should be a regexp that matches basenames.
43             If not specified, uses all filenames not starting with a dot.
44             Dirnames should be list of directories to search in.
45             If not specified, uses current directory.
46             Example:
47             findgrep -R '\bgr[ea]y\b' '\.txt$' ~/stuff
48             },
49              
50              
51             # Any further entries...
52              
53             );
54             # End of lexicon.
55              
56              
57              
58             1; # End of module.
59