r24175 - in /trunk/liblocale-maketext-lexicon-perl: ./ debian/ inc/ inc/Test/ inc/Test/Builder/ lib/Locale/Maketext/ lib/Locale/Maketext/Lexicon/ t/
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Mon Aug 11 23:42:12 UTC 2008
Author: gregoa
Date: Mon Aug 11 23:42:10 2008
New Revision: 24175
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=24175
Log:
New upstream release.
Added:
trunk/liblocale-maketext-lexicon-perl/MANIFEST.SKIP
- copied unchanged from r24174, branches/upstream/liblocale-maketext-lexicon-perl/current/MANIFEST.SKIP
trunk/liblocale-maketext-lexicon-perl/inc/PerlIO.pm
- copied unchanged from r24174, branches/upstream/liblocale-maketext-lexicon-perl/current/inc/PerlIO.pm
trunk/liblocale-maketext-lexicon-perl/t/7-comments.t
- copied unchanged from r24174, branches/upstream/liblocale-maketext-lexicon-perl/current/t/7-comments.t
trunk/liblocale-maketext-lexicon-perl/t/comments.po
- copied unchanged from r24174, branches/upstream/liblocale-maketext-lexicon-perl/current/t/comments.po
Modified:
trunk/liblocale-maketext-lexicon-perl/AUTHORS
trunk/liblocale-maketext-lexicon-perl/Changes
trunk/liblocale-maketext-lexicon-perl/MANIFEST
trunk/liblocale-maketext-lexicon-perl/META.yml
trunk/liblocale-maketext-lexicon-perl/Makefile.PL
trunk/liblocale-maketext-lexicon-perl/README
trunk/liblocale-maketext-lexicon-perl/SIGNATURE
trunk/liblocale-maketext-lexicon-perl/debian/changelog
trunk/liblocale-maketext-lexicon-perl/inc/Test/Builder.pm
trunk/liblocale-maketext-lexicon-perl/inc/Test/Builder/Module.pm
trunk/liblocale-maketext-lexicon-perl/inc/Test/More.pm
trunk/liblocale-maketext-lexicon-perl/inc/attributes.pm
trunk/liblocale-maketext-lexicon-perl/lib/Locale/Maketext/Extract.pm
trunk/liblocale-maketext-lexicon-perl/lib/Locale/Maketext/Lexicon.pm
trunk/liblocale-maketext-lexicon-perl/lib/Locale/Maketext/Lexicon/Gettext.pm
Modified: trunk/liblocale-maketext-lexicon-perl/AUTHORS
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocale-maketext-lexicon-perl/AUTHORS?rev=24175&op=diff
==============================================================================
--- trunk/liblocale-maketext-lexicon-perl/AUTHORS (original)
+++ trunk/liblocale-maketext-lexicon-perl/AUTHORS Mon Aug 11 23:42:10 2008
@@ -8,6 +8,7 @@
Alain Barbet (ALIAN)
Brian Cassidy (BRICAS)
Christian Hansen
+Cosimo Streppone (COSIMO)
Gaal Yahas (GAAL)
Harmen
Helmut Lichtenberg
Modified: trunk/liblocale-maketext-lexicon-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocale-maketext-lexicon-perl/Changes?rev=24175&op=diff
==============================================================================
--- trunk/liblocale-maketext-lexicon-perl/Changes (original)
+++ trunk/liblocale-maketext-lexicon-perl/Changes Mon Aug 11 23:42:10 2008
@@ -1,3 +1,9 @@
+[Changes for 0.67 - 2008-08-04]
+
+* Locale::Maketext::Extract: Support in Extract.pm and Lexicon/Gettext.pm
+ for parsing and keeping user comments in PO files.
+ Contributed by: Cosimo Streppone
+
[Changes for 0.66 - 2008-02-12]
* Locale::Maketext::Extract: Support in Extract.pm->extract for
Modified: trunk/liblocale-maketext-lexicon-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocale-maketext-lexicon-perl/MANIFEST?rev=24175&op=diff
==============================================================================
--- trunk/liblocale-maketext-lexicon-perl/MANIFEST (original)
+++ trunk/liblocale-maketext-lexicon-perl/MANIFEST Mon Aug 11 23:42:10 2008
@@ -13,6 +13,7 @@
inc/Module/Install/Scripts.pm
inc/Module/Install/Win32.pm
inc/Module/Install/WriteAll.pm
+inc/PerlIO.pm
inc/Test/Builder.pm
inc/Test/Builder/Module.pm
inc/Test/More.pm
@@ -25,16 +26,20 @@
lib/Locale/Maketext/Lexicon/Tie.pm
Makefile.PL
MANIFEST This list of files
+MANIFEST.SKIP
META.yml
README
script/xgettext.pl
+SIGNATURE
t/1-basic.t
t/2-lmg.t
t/3-big-endian.t
t/4-encodings.t
t/5-extract.t
t/6-gettext.t
+t/7-comments.t
t/99-bug-import-for-subclasses.t
+t/comments.po
t/gencat.m
t/locale/en/LC_MESSAGES/test.mo
t/locale/en/LC_MESSAGES/test_be.mo
@@ -48,4 +53,3 @@
t/messages.mo
t/messages.po
t/T_L10N.pm
-SIGNATURE Public-key signature (added by MakeMaker)
Modified: trunk/liblocale-maketext-lexicon-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocale-maketext-lexicon-perl/META.yml?rev=24175&op=diff
==============================================================================
--- trunk/liblocale-maketext-lexicon-perl/META.yml (original)
+++ trunk/liblocale-maketext-lexicon-perl/META.yml Mon Aug 11 23:42:10 2008
@@ -16,4 +16,4 @@
requires:
Locale::Maketext: 0.01
perl: 5.004
-version: 0.66
+version: 0.67
Modified: trunk/liblocale-maketext-lexicon-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocale-maketext-lexicon-perl/Makefile.PL?rev=24175&op=diff
==============================================================================
--- trunk/liblocale-maketext-lexicon-perl/Makefile.PL (original)
+++ trunk/liblocale-maketext-lexicon-perl/Makefile.PL Mon Aug 11 23:42:10 2008
@@ -12,4 +12,4 @@
requires 'Locale::Maketext' => '0.01';
include_deps 'Test::More';
-sign; WriteAll;
+WriteAll( sign => 1, meta => 1);
Modified: trunk/liblocale-maketext-lexicon-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocale-maketext-lexicon-perl/README?rev=24175&op=diff
==============================================================================
--- trunk/liblocale-maketext-lexicon-perl/README (original)
+++ trunk/liblocale-maketext-lexicon-perl/README Mon Aug 11 23:42:10 2008
@@ -2,8 +2,8 @@
Locale::Maketext::Lexicon - Use other catalog formats in Maketext
VERSION
- This document describes version 0.66 of Locale::Maketext::Lexicon,
- released February 12, 2008.
+ This document describes version 0.67 of Locale::Maketext::Lexicon,
+ released ...............
SYNOPSIS
As part of a localization class, automatically glob for available
Modified: trunk/liblocale-maketext-lexicon-perl/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocale-maketext-lexicon-perl/SIGNATURE?rev=24175&op=diff
==============================================================================
--- trunk/liblocale-maketext-lexicon-perl/SIGNATURE (original)
+++ trunk/liblocale-maketext-lexicon-perl/SIGNATURE Mon Aug 11 23:42:10 2008
@@ -14,12 +14,13 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-SHA1 81c677a805827bf5cee403196d398d01ee84b53f AUTHORS
-SHA1 073b48b62af6cb1f7887ef6a47cc91e9e319f823 Changes
-SHA1 a954b8f9dc3f07767ec68f0cf0dca739aacd8a55 MANIFEST
-SHA1 353c68f79a042ae9b421072192fee9fa74f67088 META.yml
-SHA1 fa0bad8af854f2b377311c90380a55edef614941 Makefile.PL
-SHA1 70e3f7cd11da87ff03ae9dc33ee3298157f9b649 README
+SHA1 fc252c495595a771e93f5a399dc0c3467dd1dbfd AUTHORS
+SHA1 48fa296e725ffed4734b7783b56d1065c7f79146 Changes
+SHA1 aceae4714f2f2dc94c0d5e28b22ff3bc7a0c05ae MANIFEST
+SHA1 ff64a729c6469e1d1ce8edccb4072672bdce4d17 MANIFEST.SKIP
+SHA1 356a68dfc6427c163ecc377b18e8e01584209447 META.yml
+SHA1 a1891bd7e13ee2a0dab5a4b30beeb3232b3c5cac Makefile.PL
+SHA1 46e61787de11ec39a40176c94d38337d62b55850 README
SHA1 7fdfd4cbb0192d65e96e99e9b1b430eb749e5c4f docs/webl10n.html
SHA1 f18225dc7b3944df8aa37337907918fedb9e0385 docs/webl10n.zh-tw.html
SHA1 7e2cfa1b9efe0d502ee57717649c90ba4bd28ba9 inc/Module/Install.pm
@@ -32,15 +33,16 @@
SHA1 92b109a1c78889f8d03eb2b2a1e0c5ea73b7ae72 inc/Module/Install/Scripts.pm
SHA1 0a8b66180229ba2f9deaea1fedd0aacf7a7ace6b inc/Module/Install/Win32.pm
SHA1 d3352eb33fe43a5f3ead513f645224fe34d73bc9 inc/Module/Install/WriteAll.pm
-SHA1 98cd56704e09b57d9ba121b45d976c3d09a9f19c inc/Test/Builder.pm
-SHA1 6e95f0ebeb31abc5608a987e88edf2e2427912c4 inc/Test/Builder/Module.pm
-SHA1 1296aa4ac787d6df9f9679d2bae4851ffef63e5a inc/Test/More.pm
-SHA1 f8e70396a1f3e0b34668d08871d7519321995283 inc/attributes.pm
-SHA1 3e27ca42e11927b55d483164017c54befa72cd6a lib/Locale/Maketext/Extract.pm
+SHA1 8b1cc43f1fc02b371cf5232e7071d3c2697f9f78 inc/PerlIO.pm
+SHA1 4f29a27c21fbf9808140f69496e8c26f586c7ab6 inc/Test/Builder.pm
+SHA1 15260d018c2f7dd0dc9705a621684149742e7a5f inc/Test/Builder/Module.pm
+SHA1 0b8387e071b32d2d595715e303e18c3d4579ca33 inc/Test/More.pm
+SHA1 a3b43f30a4aa19adb8cda1ceaf5b19da0a5e1cae inc/attributes.pm
+SHA1 c4dc4784071672c0219610781148eb3e39ee2f57 lib/Locale/Maketext/Extract.pm
SHA1 ae1c100252e17e5963a0e07a1505746d3e851515 lib/Locale/Maketext/Extract/Run.pm
-SHA1 7f5c5483642c2ab88a96e15ce835c1ad5c7e030a lib/Locale/Maketext/Lexicon.pm
+SHA1 653380897e102c66167fcdeacb129a86700f69e8 lib/Locale/Maketext/Lexicon.pm
SHA1 6d18ec954610e5bef54e3521dc57db781aee84e2 lib/Locale/Maketext/Lexicon/Auto.pm
-SHA1 d3598903e065636bf5f927ab075773ca74af57d2 lib/Locale/Maketext/Lexicon/Gettext.pm
+SHA1 90e71ed81f8c69e6263df5fdfdef379bf0a6bfc2 lib/Locale/Maketext/Lexicon/Gettext.pm
SHA1 aa70e8728c63c0165aea0280e85b8db7be70650f lib/Locale/Maketext/Lexicon/Msgcat.pm
SHA1 b7b970b5ce31515a45e164cb520021e6dbacf8f9 lib/Locale/Maketext/Lexicon/Tie.pm
SHA1 754f3979a24a74eaadf31bff04b453f58b9f73cf script/xgettext.pl
@@ -50,8 +52,10 @@
SHA1 07e68cea617f91bb9dbbd9ce0b8fdd0a486f3125 t/4-encodings.t
SHA1 0305386868418e95ba3ceebadb1299aa744ed433 t/5-extract.t
SHA1 00c15dd4ee62792ab292386b641194fad9d1bf11 t/6-gettext.t
+SHA1 142639c38f04d8c5104f44015b71a7737b56603f t/7-comments.t
SHA1 ce5c72c3bc2c78bbf8da1a0d73b08523c5d03025 t/99-bug-import-for-subclasses.t
SHA1 20689d41baa53f44caf0bc8ef8fdefcda77d82f9 t/T_L10N.pm
+SHA1 fe25b5831350ff59dbae644a47e3f2393c631edd t/comments.po
SHA1 6d8a7e12768ceae4ac44405c2374fc6b573e3a6d t/gencat.m
SHA1 d5a3581bbbec3df38f7c47dc82edfbdb0964bebd t/locale/en/LC_MESSAGES/test.mo
SHA1 76f5af7c51893120382ede3d2ef00c98d0c34b2f t/locale/en/LC_MESSAGES/test_be.mo
@@ -65,9 +69,9 @@
SHA1 6910777b47e5f73042aa40d210a5f9485510f52d t/messages.mo
SHA1 aa2cafa6c6699e00f77491d3df07a6d5db8931b1 t/messages.po
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.3 (Darwin)
+Version: GnuPG v1.4.9 (Darwin)
-iD8DBQFHsZdbtLPdNzw1AaARAmMIAJ9iSpRJp0uG5QAau0zpULYNKBKzRACeJ7TP
-e/8qskWLXivHQSyUU3QhJ0o=
-=6mss
+iEYEARECAAYFAkiXLFwACgkQEi9d9xCOQEZWUACgtH+/HZcs08myXwzj5eS+8D3k
+1kIAoMKz+GpJceNWCULWbo+0S4XoEyVu
+=aj9i
-----END PGP SIGNATURE-----
Modified: trunk/liblocale-maketext-lexicon-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocale-maketext-lexicon-perl/debian/changelog?rev=24175&op=diff
==============================================================================
--- trunk/liblocale-maketext-lexicon-perl/debian/changelog (original)
+++ trunk/liblocale-maketext-lexicon-perl/debian/changelog Mon Aug 11 23:42:10 2008
@@ -1,9 +1,10 @@
-liblocale-maketext-lexicon-perl (0.66-2) UNRELEASED; urgency=low
+liblocale-maketext-lexicon-perl (0.67-1) UNRELEASED; urgency=low
* Add debian/README.source to document quilt usage, as required by
Debian Policy since 3.8.0.
* debian/watch: add author-based URL, dist-based doesn't have the newest
version.
+ * New upstream release.
-- gregor herrmann <gregoa at debian.org> Wed, 06 Aug 2008 21:33:48 -0300
Modified: trunk/liblocale-maketext-lexicon-perl/inc/Test/Builder.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocale-maketext-lexicon-perl/inc/Test/Builder.pm?rev=24175&op=diff
==============================================================================
--- trunk/liblocale-maketext-lexicon-perl/inc/Test/Builder.pm (original)
+++ trunk/liblocale-maketext-lexicon-perl/inc/Test/Builder.pm Mon Aug 11 23:42:10 2008
@@ -1,16 +1,11 @@
#line 1
package Test::Builder;
-use 5.004;
-
-# $^C was only introduced in 5.005-ish. We do this to prevent
-# use of uninitialized value warnings in older perls.
-$^C ||= 0;
-
+use 5.006;
use strict;
-use vars qw($VERSION);
-$VERSION = '0.74';
-$VERSION = eval $VERSION; # make the alpha version come out as a number
+
+our $VERSION = '0.78';
+$VERSION = eval { $VERSION }; # make the alpha version come out as a number
# Make Test::Builder thread-safe for ithreads.
BEGIN {
@@ -67,7 +62,7 @@
}
-#line 128
+#line 110
my $Test = Test::Builder->new;
sub new {
@@ -77,7 +72,7 @@
}
-#line 150
+#line 132
sub create {
my $class = shift;
@@ -88,7 +83,7 @@
return $self;
}
-#line 169
+#line 151
use vars qw($Level);
@@ -99,7 +94,6 @@
# hash keys is just asking for pain. Also, it was documented.
$Level = 1;
- $self->{Test_Died} = 0;
$self->{Have_Plan} = 0;
$self->{No_Plan} = 0;
$self->{Original_Pid} = $$;
@@ -118,23 +112,14 @@
$self->{No_Header} = 0;
$self->{No_Ending} = 0;
+ $self->{TODO} = undef;
+
$self->_dup_stdhandles unless $^C;
- return undef;
-}
-
-#line 221
-
-sub exported_to {
- my($self, $pack) = @_;
-
- if( defined $pack ) {
- $self->{Exported_To} = $pack;
- }
- return $self->{Exported_To};
-}
-
-#line 243
+ return;
+}
+
+#line 207
sub plan {
my($self, $cmd, $arg) = @_;
@@ -173,7 +158,7 @@
return 1;
}
-#line 290
+#line 254
sub expected_tests {
my $self = shift;
@@ -192,7 +177,7 @@
}
-#line 315
+#line 279
sub no_plan {
my $self = shift;
@@ -201,7 +186,7 @@
$self->{Have_Plan} = 1;
}
-#line 330
+#line 294
sub has_plan {
my $self = shift;
@@ -212,7 +197,7 @@
};
-#line 348
+#line 312
sub skip_all {
my($self, $reason) = @_;
@@ -227,7 +212,19 @@
exit(0);
}
-#line 382
+
+#line 339
+
+sub exported_to {
+ my($self, $pack) = @_;
+
+ if( defined $pack ) {
+ $self->{Exported_To} = $pack;
+ }
+ return $self->{Exported_To};
+}
+
+#line 369
sub ok {
my($self, $test, $name) = @_;
@@ -249,9 +246,12 @@
Very confusing.
ERR
- my($pack, $file, $line) = $self->caller;
-
- my $todo = $self->todo($pack);
+ my $todo = $self->todo();
+
+ # Capture the value of $TODO for the rest of this ok() call
+ # so it can more easily be found by other routines.
+ local $self->{TODO} = $todo;
+
$self->_unoverload_str(\$todo);
my $out;
@@ -296,13 +296,14 @@
my $msg = $todo ? "Failed (TODO)" : "Failed";
$self->_print_diag("\n") if $ENV{HARNESS_ACTIVE};
- if( defined $name ) {
- $self->diag(qq[ $msg test '$name'\n]);
- $self->diag(qq[ at $file line $line.\n]);
- }
- else {
- $self->diag(qq[ $msg test at $file line $line.\n]);
- }
+ my(undef, $file, $line) = $self->caller;
+ if( defined $name ) {
+ $self->diag(qq[ $msg test '$name'\n]);
+ $self->diag(qq[ at $file line $line.\n]);
+ }
+ else {
+ $self->diag(qq[ $msg test at $file line $line.\n]);
+ }
}
return $test ? 1 : 0;
@@ -361,7 +362,7 @@
-#line 530
+#line 521
sub is_eq {
my($self, $got, $expect, $name) = @_;
@@ -418,6 +419,7 @@
}
}
+ local $Level = $Level + 1;
return $self->diag(sprintf <<DIAGNOSTIC, $got, $expect);
got: %s
expected: %s
@@ -425,7 +427,7 @@
}
-#line 608
+#line 600
sub isnt_eq {
my($self, $got, $dont_expect, $name) = @_;
@@ -460,7 +462,7 @@
}
-#line 660
+#line 652
sub like {
my($self, $this, $regex, $name) = @_;
@@ -477,7 +479,7 @@
}
-#line 685
+#line 677
my %numeric_cmps = map { ($_, 1) }
@@ -500,7 +502,8 @@
my $code = $self->_caller_context;
- # Yes, it has to look like this or 5.4.5 won't see the #line directive.
+ # Yes, it has to look like this or 5.4.5 won't see the #line
+ # directive.
# Don't ask me, man, I just work here.
$test = eval "
$code" . "\$got $type \$expect;";
@@ -525,6 +528,8 @@
$got = defined $got ? "'$got'" : 'undef';
$expect = defined $expect ? "'$expect'" : 'undef';
+
+ local $Level = $Level + 1;
return $self->diag(sprintf <<DIAGNOSTIC, $got, $type, $expect);
%s
%s
@@ -544,7 +549,7 @@
return $code;
}
-#line 771
+#line 766
sub BAIL_OUT {
my($self, $reason) = @_;
@@ -554,12 +559,12 @@
exit 255;
}
-#line 784
+#line 779
*BAILOUT = \&BAIL_OUT;
-#line 796
+#line 791
sub skip {
my($self, $why) = @_;
@@ -591,7 +596,7 @@
}
-#line 838
+#line 833
sub todo_skip {
my($self, $why) = @_;
@@ -620,7 +625,7 @@
}
-#line 916
+#line 911
sub maybe_regex {
@@ -632,7 +637,7 @@
my($re, $opts);
# Check for qr/foo/
- if( ref $regex eq 'Regexp' ) {
+ if( _is_qr($regex) ) {
$usable_regex = $regex;
}
# Check for '/foo/' or 'm,foo,'
@@ -644,7 +649,18 @@
}
return $usable_regex;
-};
+}
+
+
+sub _is_qr {
+ my $regex = shift;
+
+ # is_regexp() checks for regexes in a robust manner, say if they're
+ # blessed.
+ return re::is_regexp($regex) if defined &re::is_regexp;
+ return ref $regex eq 'Regexp';
+}
+
sub _regex_ok {
my($self, $this, $regex, $cmp, $name) = @_;
@@ -663,7 +679,8 @@
local($@, $!, $SIG{__DIE__}); # isolate eval
- # Yes, it has to look like this or 5.4.5 won't see the #line directive.
+ # Yes, it has to look like this or 5.4.5 won't see the #line
+ # directive.
# Don't ask me, man, I just work here.
$test = eval "
$code" . q{$test = $this =~ /$usable_regex/ ? 1 : 0};
@@ -677,6 +694,8 @@
unless( $ok ) {
$this = defined $this ? "'$this'" : 'undef';
my $match = $cmp eq '=~' ? "doesn't match" : "matches";
+
+ local $Level = $Level + 1;
$self->diag(sprintf <<DIAGNOSTIC, $this, $match, $regex);
%s
%13s '%s'
@@ -691,7 +710,7 @@
# I'm not ready to publish this. It doesn't deal with array return
# values from the code or context.
-#line 1000
+#line 1009
sub _try {
my($self, $code) = @_;
@@ -704,7 +723,7 @@
return wantarray ? ($return, $@) : $return;
}
-#line 1022
+#line 1031
sub is_fh {
my $self = shift;
@@ -720,7 +739,7 @@
}
-#line 1067
+#line 1076
sub level {
my($self, $level) = @_;
@@ -732,7 +751,7 @@
}
-#line 1100
+#line 1109
sub use_numbers {
my($self, $use_nums) = @_;
@@ -744,7 +763,7 @@
}
-#line 1134
+#line 1143
foreach my $attribute (qw(No_Header No_Ending No_Diag)) {
my $method = lc $attribute;
@@ -758,12 +777,12 @@
return $self->{$attribute};
};
- no strict 'refs';
+ no strict 'refs'; ## no critic
*{__PACKAGE__.'::'.$method} = $code;
}
-#line 1188
+#line 1197
sub diag {
my($self, @msgs) = @_;
@@ -790,7 +809,7 @@
return 0;
}
-#line 1225
+#line 1234
sub _print {
my($self, @msgs) = @_;
@@ -814,7 +833,7 @@
print $fh $msg;
}
-#line 1259
+#line 1268
sub _print_diag {
my $self = shift;
@@ -824,7 +843,7 @@
print $fh @_;
}
-#line 1296
+#line 1305
sub output {
my($self, $fh) = @_;
@@ -863,10 +882,9 @@
$fh = $file_or_fh;
}
else {
- $fh = do { local *FH };
- open $fh, ">$file_or_fh" or
+ open $fh, ">", $file_or_fh or
$self->croak("Can't open test output log $file_or_fh: $!");
- _autoflush($fh);
+ _autoflush($fh);
}
return $fh;
@@ -881,6 +899,7 @@
}
+my($Testout, $Testerr);
sub _dup_stdhandles {
my $self = shift;
@@ -888,29 +907,47 @@
# Set everything to unbuffered else plain prints to STDOUT will
# come out in the wrong order from our own prints.
- _autoflush(\*TESTOUT);
+ _autoflush($Testout);
_autoflush(\*STDOUT);
- _autoflush(\*TESTERR);
+ _autoflush($Testerr);
_autoflush(\*STDERR);
- $self->output(\*TESTOUT);
- $self->failure_output(\*TESTERR);
- $self->todo_output(\*TESTOUT);
+ $self->output ($Testout);
+ $self->failure_output($Testerr);
+ $self->todo_output ($Testout);
}
my $Opened_Testhandles = 0;
sub _open_testhandles {
+ my $self = shift;
+
return if $Opened_Testhandles;
+
# We dup STDOUT and STDERR so people can change them in their
# test suites while still getting normal test output.
- open(TESTOUT, ">&STDOUT") or die "Can't dup STDOUT: $!";
- open(TESTERR, ">&STDERR") or die "Can't dup STDERR: $!";
+ open( $Testout, ">&STDOUT") or die "Can't dup STDOUT: $!";
+ open( $Testerr, ">&STDERR") or die "Can't dup STDERR: $!";
+
+# $self->_copy_io_layers( \*STDOUT, $Testout );
+# $self->_copy_io_layers( \*STDERR, $Testerr );
+
$Opened_Testhandles = 1;
}
-#line 1396
+sub _copy_io_layers {
+ my($self, $src, $dest) = @_;
+
+ $self->_try(sub {
+ require PerlIO;
+ my @layers = PerlIO::get_layers($src);
+
+ binmode $dest, join " ", map ":$_", @layers if @layers;
+ });
+}
+
+#line 1423
sub _message_at_caller {
my $self = shift;
@@ -939,7 +976,7 @@
}
}
-#line 1444
+#line 1471
sub current_test {
my($self, $num) = @_;
@@ -975,7 +1012,7 @@
}
-#line 1489
+#line 1516
sub summary {
my($self) = shift;
@@ -983,27 +1020,29 @@
return map { $_->{'ok'} } @{ $self->{Test_Results} };
}
-#line 1544
+#line 1571
sub details {
my $self = shift;
return @{ $self->{Test_Results} };
}
-#line 1569
+#line 1597
sub todo {
my($self, $pack) = @_;
- $pack = $pack || $self->exported_to || $self->caller($Level);
+ return $self->{TODO} if defined $self->{TODO};
+
+ $pack = $pack || $self->caller(1) || $self->exported_to;
return 0 unless $pack;
- no strict 'refs';
+ no strict 'refs'; ## no critic
return defined ${$pack.'::TODO'} ? ${$pack.'::TODO'}
: 0;
}
-#line 1590
+#line 1622
sub caller {
my($self, $height) = @_;
@@ -1013,9 +1052,9 @@
return wantarray ? @caller : $caller[0];
}
-#line 1602
-
-#line 1616
+#line 1634
+
+#line 1648
#'#
sub _sanity_check {
@@ -1028,7 +1067,7 @@
'Somehow you got a different number of results than tests ran!');
}
-#line 1637
+#line 1669
sub _whoa {
my($self, $check, $desc) = @_;
@@ -1041,7 +1080,7 @@
}
}
-#line 1659
+#line 1691
sub _my_exit {
$? = $_[0];
@@ -1050,37 +1089,29 @@
}
-#line 1672
-
-$SIG{__DIE__} = sub {
- # We don't want to muck with death in an eval, but $^S isn't
- # totally reliable. 5.005_03 and 5.6.1 both do the wrong thing
- # with it. Instead, we use caller. This also means it runs under
- # 5.004!
- my $in_eval = 0;
- for( my $stack = 1; my $sub = (CORE::caller($stack))[3]; $stack++ ) {
- $in_eval = 1 if $sub =~ /^\(eval\)/;
- }
- $Test->{Test_Died} = 1 unless $in_eval;
-};
+#line 1704
sub _ending {
my $self = shift;
+ my $real_exit_code = $?;
$self->_sanity_check();
# Don't bother with an ending if this is a forked copy. Only the parent
# should do the ending.
+ if( $self->{Original_Pid} != $$ ) {
+ return;
+ }
+
# Exit if plan() was never called. This is so "require Test::Simple"
# doesn't puke.
+ if( !$self->{Have_Plan} ) {
+ return;
+ }
+
# Don't do an ending if we bailed out.
- if( ($self->{Original_Pid} != $$) or
- (!$self->{Have_Plan} && !$self->{Test_Died}) or
- $self->{Bailed_Out}
- )
- {
- _my_exit($?);
- return;
+ if( $self->{Bailed_Out} ) {
+ return;
}
# Figure out if we passed or failed and print helpful messages.
@@ -1130,7 +1161,7 @@
FAIL
}
- if( $self->{Test_Died} ) {
+ if( $real_exit_code ) {
$self->diag(<<"FAIL");
Looks like your test died just after $self->{Curr_Test}.
FAIL
@@ -1154,7 +1185,7 @@
elsif ( $self->{Skip_All} ) {
_my_exit( 0 ) && return;
}
- elsif ( $self->{Test_Died} ) {
+ elsif ( $real_exit_code ) {
$self->diag(<<'FAIL');
Looks like your test died before it could output anything.
FAIL
@@ -1170,6 +1201,6 @@
$Test->_ending if defined $Test and !$Test->no_ending;
}
-#line 1847
+#line 1871
1;
Modified: trunk/liblocale-maketext-lexicon-perl/inc/Test/Builder/Module.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocale-maketext-lexicon-perl/inc/Test/Builder/Module.pm?rev=24175&op=diff
==============================================================================
--- trunk/liblocale-maketext-lexicon-perl/inc/Test/Builder/Module.pm (original)
+++ trunk/liblocale-maketext-lexicon-perl/inc/Test/Builder/Module.pm Mon Aug 11 23:42:10 2008
@@ -1,14 +1,14 @@
#line 1
package Test::Builder::Module;
+
+use strict;
use Test::Builder;
require Exporter;
- at ISA = qw(Exporter);
+our @ISA = qw(Exporter);
-$VERSION = '0.74';
-
-use strict;
+our $VERSION = '0.78';
# 5.004's Exporter doesn't have export_to_level.
my $_export_to_level = sub {
@@ -24,6 +24,9 @@
sub import {
my($class) = shift;
+
+ # Don't run all this when loading ourself.
+ return 1 if $class eq 'Test::Builder::Module';
my $test = $class->builder;
@@ -67,12 +70,12 @@
}
-#line 144
+#line 147
sub import_extra {}
-#line 175
+#line 178
sub builder {
return Test::Builder->new;
Modified: trunk/liblocale-maketext-lexicon-perl/inc/Test/More.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocale-maketext-lexicon-perl/inc/Test/More.pm?rev=24175&op=diff
==============================================================================
--- trunk/liblocale-maketext-lexicon-perl/inc/Test/More.pm (original)
+++ trunk/liblocale-maketext-lexicon-perl/inc/Test/More.pm Mon Aug 11 23:42:10 2008
@@ -1,8 +1,7 @@
#line 1
package Test::More;
-use 5.004;
-
+use 5.006;
use strict;
@@ -17,7 +16,7 @@
use vars qw($VERSION @ISA @EXPORT %EXPORT_TAGS $TODO);
-$VERSION = '0.74';
+$VERSION = '0.78';
$VERSION = eval $VERSION; # make the alpha version come out as a number
use Test::Builder::Module;
@@ -32,11 +31,11 @@
plan
can_ok isa_ok
diag
- BAIL_OUT
+ BAIL_OUT
);
-#line 157
+#line 156
sub plan {
my $tb = Test::More->builder;
@@ -70,7 +69,7 @@
}
-#line 257
+#line 256
sub ok ($;$) {
my($test, $name) = @_;
@@ -79,7 +78,7 @@
$tb->ok($test, $name);
}
-#line 324
+#line 323
sub is ($$;$) {
my $tb = Test::More->builder;
@@ -96,7 +95,7 @@
*isn't = \&isnt;
-#line 369
+#line 368
sub like ($$;$) {
my $tb = Test::More->builder;
@@ -105,7 +104,7 @@
}
-#line 385
+#line 384
sub unlike ($$;$) {
my $tb = Test::More->builder;
@@ -114,7 +113,7 @@
}
-#line 425
+#line 424
sub cmp_ok($$$;$) {
my $tb = Test::More->builder;
@@ -123,7 +122,7 @@
}
-#line 461
+#line 460
sub can_ok ($@) {
my($proto, @methods) = @_;
@@ -158,7 +157,7 @@
return $ok;
}
-#line 523
+#line 522
sub isa_ok ($$;$) {
my($object, $class, $obj_name) = @_;
@@ -212,7 +211,7 @@
}
-#line 592
+#line 591
sub pass (;$) {
my $tb = Test::More->builder;
@@ -224,7 +223,7 @@
$tb->ok(0, @_);
}
-#line 653
+#line 652
sub use_ok ($;@) {
my($module, @imports) = @_;
@@ -233,30 +232,28 @@
my($pack,$filename,$line) = caller;
- # Work around a glitch in $@ and eval
- my $eval_error;
- {
- local($@,$!,$SIG{__DIE__}); # isolate eval
-
- if( @imports == 1 and $imports[0] =~ /^\d+(?:\.\d+)?$/ ) {
- # probably a version check. Perl needs to see the bare number
- # for it to work with non-Exporter based modules.
- eval <<USE;
+ my $code;
+ if( @imports == 1 and $imports[0] =~ /^\d+(?:\.\d+)?$/ ) {
+ # probably a version check. Perl needs to see the bare number
+ # for it to work with non-Exporter based modules.
+ $code = <<USE;
package $pack;
use $module $imports[0];
+1;
USE
- }
- else {
- eval <<USE;
+ }
+ else {
+ $code = <<USE;
package $pack;
-use $module \@imports;
+use $module \@{\$args[0]};
+1;
USE
- }
- $eval_error = $@;
- }
-
- my $ok = $tb->ok( !$eval_error, "use $module;" );
-
+ }
+
+
+ my($eval_result, $eval_error) = _eval($code, \@imports);
+ my $ok = $tb->ok( $eval_result, "use $module;" );
+
unless( $ok ) {
chomp $eval_error;
$@ =~ s{^BEGIN failed--compilation aborted at .*$}
@@ -271,7 +268,21 @@
return $ok;
}
-#line 707
+
+sub _eval {
+ my($code) = shift;
+ my @args = @_;
+
+ # Work around oddities surrounding resetting of $@ by immediately
+ # storing it.
+ local($@,$!,$SIG{__DIE__}); # isolate eval
+ my $eval_result = eval $code;
+ my $eval_error = $@;
+
+ return($eval_result, $eval_error);
+}
+
+#line 718
sub require_ok ($) {
my($module) = shift;
@@ -283,20 +294,20 @@
# Module names must be barewords, files not.
$module = qq['$module'] unless _is_module_name($module);
- local($!, $@, $SIG{__DIE__}); # isolate eval
- local $SIG{__DIE__};
- eval <<REQUIRE;
+ my $code = <<REQUIRE;
package $pack;
require $module;
+1;
REQUIRE
- my $ok = $tb->ok( !$@, "require $module;" );
+ my($eval_result, $eval_error) = _eval($code);
+ my $ok = $tb->ok( $eval_result, "require $module;" );
unless( $ok ) {
- chomp $@;
+ chomp $eval_error;
$tb->diag(<<DIAGNOSTIC);
Tried to require '$module'.
- Error: $@
+ Error: $eval_error
DIAGNOSTIC
}
@@ -315,7 +326,7 @@
$module =~ /^[a-zA-Z]\w*$/;
}
-#line 784
+#line 795
use vars qw(@Data_Stack %Refs_Seen);
my $DNE = bless [], 'Does::Not::Exist';
@@ -422,7 +433,7 @@
return '';
}
-#line 930
+#line 941
sub diag {
my $tb = Test::More->builder;
@@ -431,7 +442,7 @@
}
-#line 999
+#line 1010
#'#
sub skip {
@@ -459,7 +470,7 @@
}
-#line 1086
+#line 1097
sub todo_skip {
my($why, $how_many) = @_;
@@ -480,7 +491,7 @@
last TODO;
}
-#line 1139
+#line 1150
sub BAIL_OUT {
my $reason = shift;
@@ -489,7 +500,7 @@
$tb->BAIL_OUT($reason);
}
-#line 1178
+#line 1189
#'#
sub eq_array {
@@ -613,7 +624,7 @@
}
-#line 1309
+#line 1320
sub eq_hash {
local @Data_Stack;
@@ -646,7 +657,7 @@
return $ok;
}
-#line 1366
+#line 1377
sub eq_set {
my($a1, $a2) = @_;
@@ -672,6 +683,6 @@
);
}
-#line 1556
+#line 1567
1;
Modified: trunk/liblocale-maketext-lexicon-perl/inc/attributes.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocale-maketext-lexicon-perl/inc/attributes.pm?rev=24175&op=diff
==============================================================================
--- trunk/liblocale-maketext-lexicon-perl/inc/attributes.pm (original)
+++ trunk/liblocale-maketext-lexicon-perl/inc/attributes.pm Mon Aug 11 23:42:10 2008
@@ -1,7 +1,7 @@
#line 1
package attributes;
-our $VERSION = 0.08;
+our $VERSION = 0.06;
@EXPORT_OK = qw(get reftype);
@EXPORT = ();
@@ -24,6 +24,7 @@
#sub _fetch_attrs ($) ;
#sub _guess_stash ($) ;
#sub _modify_attrs ;
+#sub _warn_reserved () ;
#
# The extra trips through newATTRSUB in the interpreter wipe out any savings
# from avoiding the BEGIN block. Just do the bootstrap now.
@@ -43,10 +44,9 @@
my @badattrs;
if ($pkgmeth) {
my @pkgattrs = _modify_attrs($svref, @attrs);
- @badattrs = $pkgmeth->($home_stash, $svref, @pkgattrs);
+ @badattrs = $pkgmeth->($home_stash, $svref, @attrs);
if (!@badattrs && @pkgattrs) {
- require warnings;
- return unless warnings::enabled('reserved');
+ return unless _warn_reserved;
@pkgattrs = grep { m/\A[[:lower:]]+(?:\z|\()/ } @pkgattrs;
if (@pkgattrs) {
for my $attr (@pkgattrs) {
Modified: trunk/liblocale-maketext-lexicon-perl/lib/Locale/Maketext/Extract.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocale-maketext-lexicon-perl/lib/Locale/Maketext/Extract.pm?rev=24175&op=diff
==============================================================================
--- trunk/liblocale-maketext-lexicon-perl/lib/Locale/Maketext/Extract.pm (original)
+++ trunk/liblocale-maketext-lexicon-perl/lib/Locale/Maketext/Extract.pm Mon Aug 11 23:42:10 2008
@@ -115,6 +115,7 @@
sub clear {
$_[0]->set_header;
$_[0]->set_lexicon;
+ $_[0]->set_comments;
$_[0]->set_entries;
$_[0]->set_compiled_entries;
}
@@ -140,16 +141,29 @@
$self->set_header("$header\n");
require Locale::Maketext::Lexicon::Gettext;
- my $lexicon = (
- defined($_)
- ? Locale::Maketext::Lexicon::Gettext->parse($_, <LEXICON>)
- : {}
- );
+ my $lexicon = {};
+ my $comments = {};
+
+ if (defined($_)) {
+ ($lexicon, $comments) = Locale::Maketext::Lexicon::Gettext->parse($_, <LEXICON>);
+ }
# Internally the lexicon is in gettext format already.
$self->set_lexicon( { map _maketext_to_gettext($_), %$lexicon } );
+ $self->set_comments( $comments );
close LEXICON;
+}
+
+sub msg_comment {
+ my $self = shift;
+ my $msgid = shift;
+ my $comment = $self->{comments}->{$msgid};
+ return $comment;
+}
+
+sub set_comments {
+ $_[0]->{comments}=$_[1];
}
=head3 method write_po ($file, $add_format_marker?)
@@ -167,6 +181,10 @@
foreach my $msgid ($self->msgids) {
$self->normalize_space($msgid);
print LEXICON "\n";
+ if (my $comment = $self->msg_comment($msgid)) {
+ my @lines = split "\n", $comment;
+ print LEXICON map {"# $_\n"} @lines;
+ }
print LEXICON $self->msg_positions($msgid);
print LEXICON $self->msg_variables($msgid);
print LEXICON $self->msg_format($msgid) if $add_format_marker;
Modified: trunk/liblocale-maketext-lexicon-perl/lib/Locale/Maketext/Lexicon.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocale-maketext-lexicon-perl/lib/Locale/Maketext/Lexicon.pm?rev=24175&op=diff
==============================================================================
--- trunk/liblocale-maketext-lexicon-perl/lib/Locale/Maketext/Lexicon.pm (original)
+++ trunk/liblocale-maketext-lexicon-perl/lib/Locale/Maketext/Lexicon.pm Mon Aug 11 23:42:10 2008
@@ -1,5 +1,5 @@
package Locale::Maketext::Lexicon;
-$Locale::Maketext::Lexicon::VERSION = '0.66';
+$Locale::Maketext::Lexicon::VERSION = '0.67';
use 5.004;
use strict;
@@ -10,8 +10,8 @@
=head1 VERSION
-This document describes version 0.66 of Locale::Maketext::Lexicon,
-released February 12, 2008.
+This document describes version 0.67 of Locale::Maketext::Lexicon,
+released August 4, 2008.
=head1 SYNOPSIS
Modified: trunk/liblocale-maketext-lexicon-perl/lib/Locale/Maketext/Lexicon/Gettext.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocale-maketext-lexicon-perl/lib/Locale/Maketext/Lexicon/Gettext.pm?rev=24175&op=diff
==============================================================================
--- trunk/liblocale-maketext-lexicon-perl/lib/Locale/Maketext/Lexicon/Gettext.pm (original)
+++ trunk/liblocale-maketext-lexicon-perl/lib/Locale/Maketext/Lexicon/Gettext.pm Mon Aug 11 23:42:10 2008
@@ -94,6 +94,7 @@
my $self = shift;
my (%var, $key, @ret);
my @metadata;
+ my @comments;
$InputEncoding = $OutputEncoding = $DoEncoding = undef;
@@ -116,8 +117,11 @@
elsif ($AllowEmpty) {
push @ret, (transform($var{msgid}), '');
}
- push @metadata, parse_metadata($var{msgstr})
- if $var{msgid} eq '';
+ if ($var{msgid} eq '') {
+ push @metadata, parse_metadata($var{msgstr});
+ } else {
+ push @comments, transform($var{msgid}), $var{msgcomment};
+ }
%var = ();
};
@@ -138,6 +142,12 @@
}
:
+ /^# (.*)$/
+ ? do { # user comments
+ $var{msgcomment} .= $1 . "\n";
+ }
+ :
+
/^#, +(.*) *$/
? do { # control variables
$var{$_} = 1 for split(/,\s+/, $1);
@@ -149,6 +159,7 @@
$process->($_);
}
: ();
+
}
# do not silently skip last entry
@@ -159,7 +170,11 @@
push @metadata, parse_metadata($var{msgstr})
if $var{msgid} eq '';
- return { @metadata, @ret };
+ return wantarray
+ ? ( { @metadata, @ret }, { @comments } )
+ : ( { @metadata, @ret } )
+ ;
+
}
sub parse_metadata {
More information about the Pkg-perl-cvs-commits
mailing list