diff options
author | Jesse Luehrs <doy@tozt.net> | 2010-02-19 15:51:06 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2010-02-19 16:09:43 -0600 |
commit | 5c3092f1838b4e4331dadc228aac6147a9bf24e4 (patch) | |
tree | 3d5fe5177d448f83b2419d8fc15fcad1cffc9bbc /lib/Locale | |
parent | b899fd319a9b33107b968fa88cf982653b1bdb0a (diff) | |
download | locale-pofilemanager-5c3092f1838b4e4331dadc228aac6147a9bf24e4.tar.gz locale-pofilemanager-5c3092f1838b4e4331dadc228aac6147a9bf24e4.zip |
a few cleanups
Diffstat (limited to 'lib/Locale')
-rw-r--r-- | lib/Locale/POFileManager.pm | 8 | ||||
-rw-r--r-- | lib/Locale/POFileManager/File.pm | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/lib/Locale/POFileManager.pm b/lib/Locale/POFileManager.pm index 573cf1c..811105f 100644 --- a/lib/Locale/POFileManager.pm +++ b/lib/Locale/POFileManager.pm @@ -29,9 +29,9 @@ has files => ( builder => '_build_files', init_arg => undef, handles => { - files => 'elements', - first_file => 'first', - _add_file => 'push', + files => 'elements', + _first_file => 'first', + _add_file => 'push', }, ); @@ -131,7 +131,7 @@ sub language_file { my $self = shift; my ($lang) = @_; - return $self->first_file(sub { + return $self->_first_file(sub { $_->language eq $lang; }); } diff --git a/lib/Locale/POFileManager/File.pm b/lib/Locale/POFileManager/File.pm index fd1575b..368025b 100644 --- a/lib/Locale/POFileManager/File.pm +++ b/lib/Locale/POFileManager/File.pm @@ -40,12 +40,6 @@ sub _build_entries { return (-r $filename) ? Locale::PO->load_file_asarray($filename) : []; } -sub entry_for { - my $self = shift; - my ($msgid) = @_; - return first { $_->msgid eq '"' . $msgid . '"' } $self->entries; -} - sub add_entry { my $self = shift; if (@_ == 1) { @@ -58,6 +52,12 @@ sub add_entry { } } +sub entry_for { + my $self = shift; + my ($msgid) = @_; + return first { $_->msgid eq '"' . $msgid . '"' } $self->entries; +} + sub save { my $self = shift; |