Changeset 5853
- Timestamp:
- 07/05/09 21:45:03 (3 years ago)
- Location:
- trunk/Locale-Msgfmt
- Files:
-
- 3 added
- 2 edited
-
Changes (modified) (1 diff)
-
lib/Locale/Msgfmt.pm (modified) (4 diffs)
-
lib/Module (added)
-
lib/Module/Install (added)
-
lib/Module/Install/Msgfmt.pm (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Locale-Msgfmt/Changes
r5729 r5853 6 6 - use is_deeply instead of making a string out of the hash and 7 7 then using is 8 - add Module::Install::Msgfmt. just replace install_share with 9 install_share_with_mofiles in your Makefile.PL. 10 - add remove option to remove the source file(s) and all .pot 11 files if a directory is being processed 12 - add verbose option to print the files that were converted 8 13 9 14 0.08 Jun 27, 2009 -
trunk/Locale-Msgfmt/lib/Locale/Msgfmt.pm
r5660 r5853 58 58 $mo->prepare(); 59 59 $mo->out($hash->{out}); 60 print $hash->{in} . " -> " . $hash->{out} . "\n" if($hash->{verbose}); 61 unlink($hash->{in}) if($hash->{remove}); 60 62 } 61 63 … … 74 76 my @list = readdir D; 75 77 closedir D; 78 my @removelist = (); 79 if($hash->{remove}) { 80 @removelist = grep /\.pot$/, @list; 81 } 76 82 @list = grep /\.po$/, @list; 77 83 my %files; … … 81 87 $files{$in} = $out; 82 88 } 83 delete $hash->{in};84 delete $hash->{out};85 89 foreach(keys %files) { 86 90 my %newhash = (%{$hash}); … … 88 92 $newhash{out} = $files{$_}; 89 93 _msgfmt(\%newhash); 94 } 95 foreach(@removelist) { 96 my $f = File::Spec->catfile($hash->{in}, $_); 97 print "-$f\n" if($hash->{verbose}); 98 unlink($f); 90 99 } 91 100 }
Note: See TracChangeset
for help on using the changeset viewer.
