r39431 - in /branches/upstream/liblocale-msgfmt-perl/current: Changes META.yml lib/Locale/Msgfmt.pm lib/Locale/Msgfmt/Utils.pm lib/Locale/Msgfmt/mo.pm lib/Locale/Msgfmt/po.pm lib/Module/Install/Msgfmt.pm t/interface.t
ryan52-guest at users.alioth.debian.org
ryan52-guest at users.alioth.debian.org
Mon Jul 6 23:44:39 UTC 2009
Author: ryan52-guest
Date: Mon Jul 6 23:44:34 2009
New Revision: 39431
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=39431
Log:
[svn-upgrade] Integrating new upstream version, liblocale-msgfmt-perl (0.11)
Modified:
branches/upstream/liblocale-msgfmt-perl/current/Changes
branches/upstream/liblocale-msgfmt-perl/current/META.yml
branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt.pm
branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/Utils.pm
branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/mo.pm
branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/po.pm
branches/upstream/liblocale-msgfmt-perl/current/lib/Module/Install/Msgfmt.pm
branches/upstream/liblocale-msgfmt-perl/current/t/interface.t
Modified: branches/upstream/liblocale-msgfmt-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocale-msgfmt-perl/current/Changes?rev=39431&op=diff
==============================================================================
--- branches/upstream/liblocale-msgfmt-perl/current/Changes (original)
+++ branches/upstream/liblocale-msgfmt-perl/current/Changes Mon Jul 6 23:44:34 2009
@@ -1,4 +1,8 @@
Revision history for Locale-Msgfmt
+
+
+0.11 Jul 06, 2009
+ - some code improvement in open() and opendir() and error handling (SZABGAB)
0.10 Jul 5, 2009
- actually upload with Module::Install::Msgfmt this time.
Modified: branches/upstream/liblocale-msgfmt-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocale-msgfmt-perl/current/META.yml?rev=39431&op=diff
==============================================================================
--- branches/upstream/liblocale-msgfmt-perl/current/META.yml (original)
+++ branches/upstream/liblocale-msgfmt-perl/current/META.yml Mon Jul 6 23:44:34 2009
@@ -1,6 +1,6 @@
---
name: Locale-Msgfmt
-version: 0.10
+version: 0.11
author:
- 'Ryan Niebur <ryanryan52 at gmail.com>'
abstract: Compile .po files to .mo files
@@ -12,19 +12,19 @@
provides:
Locale::Msgfmt:
file: lib/Locale/Msgfmt.pm
- version: 0.10
+ version: 0.11
Locale::Msgfmt::Utils:
file: lib/Locale/Msgfmt/Utils.pm
- version: 0.10
+ version: 0.11
Locale::Msgfmt::mo:
file: lib/Locale/Msgfmt/mo.pm
- version: 0.10
+ version: 0.11
Locale::Msgfmt::po:
file: lib/Locale/Msgfmt/po.pm
- version: 0.10
+ version: 0.11
Module::Install::Msgfmt:
file: lib/Module/Install/Msgfmt.pm
- version: 0.10
+ version: 0.11
generated_by: Module::Build version 0.33
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
Modified: branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt.pm?rev=39431&op=diff
==============================================================================
--- branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt.pm (original)
+++ branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt.pm Mon Jul 6 23:44:34 2009
@@ -12,7 +12,7 @@
our @EXPORT = qw/msgfmt/;
-our $VERSION = '0.10';
+our $VERSION = '0.11';
sub msgfmt {
my $hash = shift;
@@ -72,9 +72,9 @@
if ( !-d $hash->{out} ) {
File::Path::mkpath( $hash->{out} );
}
- opendir D, $hash->{in};
- my @list = readdir D;
- closedir D;
+ opendir my $D, $hash->{in} or die "Could not open ($hash->{in}) $!";
+ my @list = readdir $D;
+ closedir $D;
my @removelist = ();
if ( $hash->{remove} ) {
@removelist = grep /\.pot$/, @list;
Modified: branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/Utils.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/Utils.pm?rev=39431&op=diff
==============================================================================
--- branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/Utils.pm (original)
+++ branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/Utils.pm Mon Jul 6 23:44:34 2009
@@ -3,7 +3,7 @@
use strict;
use warnings;
-our $VERSION = '0.10';
+our $VERSION = '0.11';
sub character {
return map { pack "N*", $_ } @_;
Modified: branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/mo.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/mo.pm?rev=39431&op=diff
==============================================================================
--- branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/mo.pm (original)
+++ branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/mo.pm Mon Jul 6 23:44:34 2009
@@ -3,7 +3,7 @@
use strict;
use warnings;
-our $VERSION = '0.10';
+our $VERSION = '0.11';
use Locale::Msgfmt::Utils;
@@ -37,35 +37,35 @@
sub out {
my $self = shift;
my $file = shift;
- open OUT, ">", $file;
- binmode OUT;
- print OUT Locale::Msgfmt::Utils::from_hex( $self->{magic} );
- print OUT Locale::Msgfmt::Utils::character( $self->{format} );
- print OUT Locale::Msgfmt::Utils::character( $self->{count} );
- print OUT Locale::Msgfmt::Utils::character(28);
- print OUT Locale::Msgfmt::Utils::character( 28 + $self->{count} * 8 );
- print OUT Locale::Msgfmt::Utils::character(0);
- print OUT Locale::Msgfmt::Utils::character(0);
+ open my $OUT, ">", $file or die "Could not open ($file) $!";
+ binmode $OUT;
+ print $OUT Locale::Msgfmt::Utils::from_hex( $self->{magic} );
+ print $OUT Locale::Msgfmt::Utils::character( $self->{format} );
+ print $OUT Locale::Msgfmt::Utils::character( $self->{count} );
+ print $OUT Locale::Msgfmt::Utils::character(28);
+ print $OUT Locale::Msgfmt::Utils::character( 28 + $self->{count} * 8 );
+ print $OUT Locale::Msgfmt::Utils::character(0);
+ print $OUT Locale::Msgfmt::Utils::character(0);
foreach ( @{ $self->{sorted} } ) {
my $length = length($_);
- print OUT Locale::Msgfmt::Utils::character($length);
- print OUT Locale::Msgfmt::Utils::character( $self->{free_mem} );
+ print $OUT Locale::Msgfmt::Utils::character($length);
+ print $OUT Locale::Msgfmt::Utils::character( $self->{free_mem} );
$self->{free_mem} += $length + 1;
}
foreach ( @{ $self->{translations} } ) {
my $length = length($_);
- print OUT Locale::Msgfmt::Utils::character($length);
- print OUT Locale::Msgfmt::Utils::character( $self->{free_mem} );
+ print $OUT Locale::Msgfmt::Utils::character($length);
+ print $OUT Locale::Msgfmt::Utils::character( $self->{free_mem} );
$self->{free_mem} += $length + 1;
}
foreach ( @{ $self->{sorted} } ) {
- print OUT Locale::Msgfmt::Utils::null_terminate($_);
+ print $OUT Locale::Msgfmt::Utils::null_terminate($_);
}
foreach ( @{ $self->{translations} } ) {
- print OUT Locale::Msgfmt::Utils::null_terminate($_);
+ print $OUT Locale::Msgfmt::Utils::null_terminate($_);
}
- close OUT;
+ close $OUT;
}
=head1 NAME
Modified: branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/po.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/po.pm?rev=39431&op=diff
==============================================================================
--- branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/po.pm (original)
+++ branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/po.pm Mon Jul 6 23:44:34 2009
@@ -5,7 +5,7 @@
use strict;
use warnings;
-our $VERSION = '0.10';
+our $VERSION = '0.11';
sub new {
my $class = shift;
@@ -50,10 +50,10 @@
my $self = shift;
my $pofile = shift;
my $mo = $self->{mo};
- open F, $pofile;
+ open my $F, '<', $pofile or die "Could not open ($pofile) $!";
my %h = ();
my $type;
- while (<F>) {
+ while (<$F>) {
s/\r\n/\n/;
if (/^(msgid(?:|_plural)|msgctxt) +"(.*)" *$/) {
$type = $1;
@@ -93,7 +93,7 @@
}
}
$self->add_string( \%h );
- close F;
+ close $F;
}
sub parse {
Modified: branches/upstream/liblocale-msgfmt-perl/current/lib/Module/Install/Msgfmt.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocale-msgfmt-perl/current/lib/Module/Install/Msgfmt.pm?rev=39431&op=diff
==============================================================================
--- branches/upstream/liblocale-msgfmt-perl/current/lib/Module/Install/Msgfmt.pm (original)
+++ branches/upstream/liblocale-msgfmt-perl/current/lib/Module/Install/Msgfmt.pm Mon Jul 6 23:44:34 2009
@@ -5,7 +5,7 @@
use Module::Install::Base ();
use Module::Install::Share;
-our $VERSION = '0.10';
+our $VERSION = '0.11';
our @ISA = 'Module::Install::Base';
sub install_share_with_mofiles {
Modified: branches/upstream/liblocale-msgfmt-perl/current/t/interface.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocale-msgfmt-perl/current/t/interface.t?rev=39431&op=diff
==============================================================================
--- branches/upstream/liblocale-msgfmt-perl/current/t/interface.t (original)
+++ branches/upstream/liblocale-msgfmt-perl/current/t/interface.t Mon Jul 6 23:44:34 2009
@@ -9,11 +9,12 @@
use File::Path;
sub slurp {
- open F, shift;
- binmode F;
+ my $file = shift;
+ open my $F, '<', $file or die "Could not open ($file) $!";
+ binmode $F;
my $s = "";
- while (<F>) { $s .= $_; }
- close F;
+ while (<$F>) { $s .= $_; }
+ close $F;
return $s;
}
More information about the Pkg-perl-cvs-commits
mailing list