summaryrefslogtreecommitdiffstats
path: root/lib/Locale/POFileManager/File.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Locale/POFileManager/File.pm')
-rw-r--r--lib/Locale/POFileManager/File.pm27
1 files changed, 26 insertions, 1 deletions
diff --git a/lib/Locale/POFileManager/File.pm b/lib/Locale/POFileManager/File.pm
index b024c8c..f224e56 100644
--- a/lib/Locale/POFileManager/File.pm
+++ b/lib/Locale/POFileManager/File.pm
@@ -50,7 +50,7 @@ Accepts a hash of arguments:
=item file
-The name of the file this represents. Required.
+The name of the file this represents. Required, and must exist.
=item stub_msgstr
@@ -91,6 +91,14 @@ has stub_msgstr => (
Returns a list of msgids found in the file.
+=head2 has_msgid
+
+Returns true if the given msgid is found in the file, and false otherwise.
+
+=head2 msgstr
+
+Returns the msgstr that corresponds with the given msgid.
+
=cut
has lexicon => (
@@ -110,6 +118,16 @@ has lexicon => (
},
);
+=head2 headers
+
+Returns the list of header entries.
+
+=head2 header
+
+Returns the value of the given header entry.
+
+=cut
+
has headers => (
traits => [qw(Hash)],
isa => 'HashRef',
@@ -138,6 +156,13 @@ sub BUILD {
$self->headers;
}
+=head2 add_entry
+
+Adds an entry to the translation file. Arguments are a hash, with valid keys
+being C<msgid> and C<msgstr>.
+
+=cut
+
sub add_entry {
my $self = shift;
my %args = @_;