r13770 - in /trunk/libtext-quoted-perl: Changes MANIFEST META.yml Makefile.PL Quoted.pm debian/changelog t/7.t
hanska-guest at users.alioth.debian.org
hanska-guest at users.alioth.debian.org
Mon Jan 28 08:40:10 UTC 2008
Author: hanska-guest
Date: Mon Jan 28 08:40:10 2008
New Revision: 13770
URL: http://svn.debian.org/wsvn/?sc=1&rev=13770
Log:
* New upstream release
Added:
trunk/libtext-quoted-perl/t/7.t
Modified:
trunk/libtext-quoted-perl/Changes
trunk/libtext-quoted-perl/MANIFEST
trunk/libtext-quoted-perl/META.yml
trunk/libtext-quoted-perl/Makefile.PL
trunk/libtext-quoted-perl/Quoted.pm
trunk/libtext-quoted-perl/debian/changelog
Modified: trunk/libtext-quoted-perl/Changes
URL: http://svn.debian.org/wsvn/trunk/libtext-quoted-perl/Changes?rev=13770&op=diff
==============================================================================
--- trunk/libtext-quoted-perl/Changes (original)
+++ trunk/libtext-quoted-perl/Changes Mon Jan 28 08:40:10 2008
@@ -1,4 +1,12 @@
Revision history for Perl extension Text::Quoted.
+
+2.05 Wed Jan 24 2008
+ - fix tests failure under perl 5.6.x,
+ thanks to David Cantrell for cpan testing it
+
+2.04 Wed Jan 23 2008
+ - use own expand_tabs instead of Text::Tabs
+ - avoid segfaults when pos() is used inside of regexp
2.03 Wed Nov 7 2007
- delete a lot of unused code
Modified: trunk/libtext-quoted-perl/MANIFEST
URL: http://svn.debian.org/wsvn/trunk/libtext-quoted-perl/MANIFEST?rev=13770&op=diff
==============================================================================
--- trunk/libtext-quoted-perl/MANIFEST (original)
+++ trunk/libtext-quoted-perl/MANIFEST Mon Jan 28 08:40:10 2008
@@ -18,3 +18,4 @@
t/4.t
t/5.t
t/6.t
+t/7.t
Modified: trunk/libtext-quoted-perl/META.yml
URL: http://svn.debian.org/wsvn/trunk/libtext-quoted-perl/META.yml?rev=13770&op=diff
==============================================================================
--- trunk/libtext-quoted-perl/META.yml (original)
+++ trunk/libtext-quoted-perl/META.yml Mon Jan 28 08:40:10 2008
@@ -15,6 +15,5 @@
- t
requires:
Text::Autoformat: 0
- Text::Tabs: 0
perl: 5.6.0
-version: 2.03
+version: 2.05
Modified: trunk/libtext-quoted-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/trunk/libtext-quoted-perl/Makefile.PL?rev=13770&op=diff
==============================================================================
--- trunk/libtext-quoted-perl/Makefile.PL (original)
+++ trunk/libtext-quoted-perl/Makefile.PL Mon Jan 28 08:40:10 2008
@@ -8,6 +8,5 @@
all_from 'Quoted.pm';
requires 'Text::Autoformat';
-requires 'Text::Tabs';
WriteAll;
Modified: trunk/libtext-quoted-perl/Quoted.pm
URL: http://svn.debian.org/wsvn/trunk/libtext-quoted-perl/Quoted.pm?rev=13770&op=diff
==============================================================================
--- trunk/libtext-quoted-perl/Quoted.pm (original)
+++ trunk/libtext-quoted-perl/Quoted.pm Mon Jan 28 08:40:10 2008
@@ -1,5 +1,5 @@
package Text::Quoted;
-our $VERSION = "2.03";
+our $VERSION = "2.05";
use 5.006;
use strict;
use warnings;
@@ -10,7 +10,6 @@
our @EXPORT = qw(extract);
use Text::Autoformat(); # Provides the Hang package, heh, heh.
-use Text::Tabs();
=head1 NAME
@@ -169,11 +168,9 @@
# If the user passes in a null string, we really want to end up with _something_
# DETABIFY
- my @lines = Text::Tabs::expand( split /\n/, $text );
-
+ my @lines = expand_tabs( split /\n/, $text );
# PARSE EACH LINE
-
foreach (splice @lines) {
my %line = ( raw => $_ );
@line{'quoter', 'text'} = (/\A *($quoter?) *(.*?)\s*\Z/o);
@@ -233,4 +230,22 @@
return @paras;
}
+# we don't use Text::Tabs anymore as it may segfault on perl 5.8.x with
+# UTF-8 strings and tabs mixed. http://rt.perl.org/rt3/Public/Bug/Display.html?id=40989
+# This bug unlikely to be fixed in 5.8.x, however we use workaround.
+# As soon as Text::Tabs will be fixed we can return back to it
+my $tabstop = 8;
+sub expand_tabs {
+ my $pad;
+ for ( @_ ) {
+ my $offs = 0;
+ s{(.*?)\t}{
+ $pad = $tabstop - (length($1) + $offs) % $tabstop;
+ $offs += length($1)+$pad;
+ $1 . (" " x $pad);
+ }eg;
+ }
+ return @_;
+}
+
1;
Modified: trunk/libtext-quoted-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libtext-quoted-perl/debian/changelog?rev=13770&op=diff
==============================================================================
--- trunk/libtext-quoted-perl/debian/changelog (original)
+++ trunk/libtext-quoted-perl/debian/changelog Mon Jan 28 08:40:10 2008
@@ -1,8 +1,12 @@
-libtext-quoted-perl (2.03-2) UNRELEASED; urgency=low
+libtext-quoted-perl (2.05-1) UNRELEASED; urgency=low
+ [ gregor herrmann ]
* debian/rules: delete /usr/lib/perl5 only if it exists.
- -- gregor herrmann <gregor+debian at comodo.priv.at> Wed, 09 Jan 2008 21:19:06 +0100
+ [ David Paleino ]
+ * New upstream release
+
+ -- David Paleino <d.paleino at gmail.com> Mon, 28 Jan 2008 09:39:32 +0100
libtext-quoted-perl (2.03-1) unstable; urgency=low
Added: trunk/libtext-quoted-perl/t/7.t
URL: http://svn.debian.org/wsvn/trunk/libtext-quoted-perl/t/7.t?rev=13770&op=file
==============================================================================
--- trunk/libtext-quoted-perl/t/7.t (added)
+++ trunk/libtext-quoted-perl/t/7.t Mon Jan 28 08:40:10 2008
@@ -1,0 +1,18 @@
+use strict;
+
+use Test::More;
+if ( eval { require Encode } ) {
+ plan tests => 2;
+} else {
+ plan skip_all => "No Encode module, old perl";
+}
+
+use_ok('Text::Quoted');
+
+$a = Encode::decode_utf8("x\303\203 \tz");
+is_deeply( extract($a), [ {
+ text => Encode::decode_utf8("x\303\203 z"),
+ empty => '',
+ quoter => '',
+ raw => Encode::decode_utf8("x\303\203 z"),
+} ], "No segfault");
More information about the Pkg-perl-cvs-commits
mailing list