summaryrefslogtreecommitdiffstats
path: root/lib/Locale/POFileManager.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Locale/POFileManager.pm')
-rw-r--r--lib/Locale/POFileManager.pm42
1 files changed, 15 insertions, 27 deletions
diff --git a/lib/Locale/POFileManager.pm b/lib/Locale/POFileManager.pm
index 5ac7e35..9d4fffd 100644
--- a/lib/Locale/POFileManager.pm
+++ b/lib/Locale/POFileManager.pm
@@ -2,10 +2,7 @@ package Locale::POFileManager;
use Moose;
use MooseX::Types::Path::Class qw(Dir);
use Scalar::Util qw(reftype weaken);
-
-=head1 NAME
-
-Locale::POFileManager - Helpers for keeping a set of related .po files in sync
+# ABSTRACT: Helpers for keeping a set of related .po files in sync
=head1 SYNOPSIS
@@ -29,9 +26,7 @@ the L<Locale::Maketext::Lexicon> parser library.
=cut
-=head1 METHODS
-
-=head2 new
+=method new
Accepts a hash of arguments:
@@ -54,9 +49,7 @@ C<canonical_language>. Optional.
=back
-=cut
-
-=head2 base_dir
+=method base_dir
Returns a L<Path::Class::Dir> object corresponding to the C<base_dir> passed to
the constructor.
@@ -70,7 +63,7 @@ has base_dir => (
coerce => 1,
);
-=head2 files
+=method files
Returns a list of L<Locale::POFileManager::File> objects corresponding to the
.po files that were found in the C<base_dir>.
@@ -110,7 +103,7 @@ sub _build_files {
return \@files;
}
-=head2 canonical_language
+=method canonical_language
Returns the canonical language id passed to the constructor.
@@ -135,7 +128,7 @@ sub BUILD {
unless $self->has_language($self->canonical_language);
}
-=head2 stub_msgstr
+=method stub_msgstr
Returns the string passed to the constructor as C<stub_msgstr> if it was a
string, or a coderef wrapped to supply the C<canonical_msgstr> option if it was
@@ -163,7 +156,7 @@ sub stub_msgstr {
}
}
-=head2 has_language
+=method has_language
Returns true if a language file exists for the given language in the
C<base_dir>, false otherwise.
@@ -181,7 +174,7 @@ sub has_language {
return;
}
-=head2 add_language
+=method add_language
Creates a new language file for the language passed in as an argument. Creates
a header for that file copied over from the header in the C<canonical_language>
@@ -223,7 +216,7 @@ sub add_language {
$self->_add_file($pofile);
}
-=head2 language_file
+=method language_file
Returns the L<Locale::POFileManager::File> object corresponding to the given
language.
@@ -239,7 +232,7 @@ sub language_file {
});
}
-=head2 canonical_language_file
+=method canonical_language_file
Returns the L<Locale::POFileManager::File> object corresponding to the
C<canonical_language>.
@@ -251,7 +244,7 @@ sub canonical_language_file {
return $self->language_file($self->canonical_language);
}
-=head2 find_missing
+=method find_missing
Searches through all of the files in the C<base_dir>, and returns a hash
mapping language names to an arrayref of msgids that were found in the
@@ -271,7 +264,7 @@ sub find_missing {
return %ret;
}
-=head2 add_stubs
+=method add_stubs
Adds stub msgid (and possibly msgstr, if the C<stub_msgstr> option was given)
entries to each language file for each msgid found in the C<canonical_language>
@@ -335,16 +328,11 @@ L<http://search.cpan.org/dist/Locale-POFileManager>
=back
-=head1 AUTHOR
-
- Jesse Luehrs <doy at tozt dot net>
-
-=head1 COPYRIGHT AND LICENSE
+=begin Pod::Coverage
-This software is copyright (c) 2010 by Jesse Luehrs.
+BUILD
-This is free software; you can redistribute it and/or modify it under
-the same terms as perl itself.
+=end Pod::Coverage
=cut