r41017 - in /branches/upstream/libhttp-response-encoding-perl/current: Changes META.yml Makefile.PL lib/HTTP/Response/Encoding.pm t/01-file.t

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Thu Jul 30 19:38:50 UTC 2009


Author: jawnsy-guest
Date: Thu Jul 30 19:38:43 2009
New Revision: 41017

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=41017
Log:
[svn-upgrade] Integrating new upstream version, libhttp-response-encoding-perl (0.06)

Modified:
    branches/upstream/libhttp-response-encoding-perl/current/Changes
    branches/upstream/libhttp-response-encoding-perl/current/META.yml
    branches/upstream/libhttp-response-encoding-perl/current/Makefile.PL
    branches/upstream/libhttp-response-encoding-perl/current/lib/HTTP/Response/Encoding.pm
    branches/upstream/libhttp-response-encoding-perl/current/t/01-file.t

Modified: branches/upstream/libhttp-response-encoding-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhttp-response-encoding-perl/current/Changes?rev=41017&op=diff
==============================================================================
--- branches/upstream/libhttp-response-encoding-perl/current/Changes (original)
+++ branches/upstream/libhttp-response-encoding-perl/current/Changes Thu Jul 30 19:38:43 2009
@@ -1,8 +1,15 @@
 # Revision history for HTTP-Response-Encoding
 #
-# $Id: Changes,v 0.5 2007/05/12 09:24:15 dankogai Exp $
+# $Id: Changes,v 0.6 2009/07/28 21:25:25 dankogai Exp dankogai $
 # 
-$Revision: 0.5 $ $Date: 2007/05/12 09:24:15 $
+$Revision: 0.6 $ $Date: 2009/07/28 21:25:25 $
+! lib/HTTP/Response/Encoding.pm t/01-file.t
+  Addressed RT#47033:
+    new libwww-perl-5.827 release from 15.06.2009 breaks all tests
+  (Tested both on lwp5.826 and lwp5.830)
+  http://rt.cpan.org/Ticket/Display.html?47033
+
+0.05 2007/05/12 09:24:15
 ! lib/HTTP/Response/Encoding.pm
   removed method
   - decoded_content() because HTTP::Message already has that

Modified: branches/upstream/libhttp-response-encoding-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhttp-response-encoding-perl/current/META.yml?rev=41017&op=diff
==============================================================================
--- branches/upstream/libhttp-response-encoding-perl/current/META.yml (original)
+++ branches/upstream/libhttp-response-encoding-perl/current/META.yml Thu Jul 30 19:38:43 2009
@@ -1,16 +1,24 @@
 --- #YAML:1.0
-name:                HTTP-Response-Encoding
-version:             0.05
-abstract:            Adds encoding() to HTTP::Response
-license:             ~
-generated_by:        ExtUtils::MakeMaker version 6.32
-distribution_type:   module
-requires:     
-    Encode:                        2
-    HTTP::Response:                0
-    Test::More:                    0
-meta-spec:
-    url:     http://module-build.sourceforge.net/META-spec-v1.2.html
-    version: 1.2
+name:               HTTP-Response-Encoding
+version:            0.06
+abstract:           Adds encoding() to HTTP::Response
 author:
     - Dan Kogai <dankogai at dan.co.jp>
+license:            unknown
+distribution_type:  module
+configure_requires:
+    ExtUtils::MakeMaker:  0
+build_requires:
+    ExtUtils::MakeMaker:  0
+requires:
+    Encode:          2
+    HTTP::Response:  0
+    Test::More:      0
+no_index:
+    directory:
+        - t
+        - inc
+generated_by:       ExtUtils::MakeMaker version 6.54
+meta-spec:
+    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
+    version:  1.4

Modified: branches/upstream/libhttp-response-encoding-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhttp-response-encoding-perl/current/Makefile.PL?rev=41017&op=diff
==============================================================================
--- branches/upstream/libhttp-response-encoding-perl/current/Makefile.PL (original)
+++ branches/upstream/libhttp-response-encoding-perl/current/Makefile.PL Thu Jul 30 19:38:43 2009
@@ -12,6 +12,7 @@
     PREREQ_PM => {
         'Encode'         => 2.00,
         'Test::More'     => 0,
+	# 'HTTP::Message'  => 5.827,
         'HTTP::Response' => 0,
       },
     dist                => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },

Modified: branches/upstream/libhttp-response-encoding-perl/current/lib/HTTP/Response/Encoding.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhttp-response-encoding-perl/current/lib/HTTP/Response/Encoding.pm?rev=41017&op=diff
==============================================================================
--- branches/upstream/libhttp-response-encoding-perl/current/lib/HTTP/Response/Encoding.pm (original)
+++ branches/upstream/libhttp-response-encoding-perl/current/lib/HTTP/Response/Encoding.pm Thu Jul 30 19:38:43 2009
@@ -1,11 +1,20 @@
 package HTTP::Response::Encoding;
 use warnings;
 use strict;
-our $VERSION = sprintf "%d.%02d", q$Revision: 0.5 $ =~ /(\d+)/g;
+our $VERSION = sprintf "%d.%02d", q$Revision: 0.6 $ =~ /(\d+)/g;
 
 sub HTTP::Response::charset {
     my $self = shift;
     return $self->{__charset} if exists $self->{__charset};
+    if ($self->can('content_charset')){
+	# To suppress:
+	# Parsing of undecoded UTF-8 will give garbage when decoding entities
+	local $SIG{__WARN__} = sub {};
+	my $charset = $self->content_charset;
+	$self->{__charset} = $charset;
+	return $charset;
+    }
+
     my $content_type = $self->headers->header('Content-Type');
     return unless $content_type;
     $content_type =~ /charset=([A-Za-z0-9_\-]+)/io;
@@ -32,7 +41,7 @@
 
 =head1 VERSION
 
-$Id: Encoding.pm,v 0.5 2007/05/12 09:24:15 dankogai Exp $
+$Id: Encoding.pm,v 0.6 2009/07/28 21:25:25 dankogai Exp dankogai $
 
 =cut
 

Modified: branches/upstream/libhttp-response-encoding-perl/current/t/01-file.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhttp-response-encoding-perl/current/t/01-file.t?rev=41017&op=diff
==============================================================================
--- branches/upstream/libhttp-response-encoding-perl/current/t/01-file.t (original)
+++ branches/upstream/libhttp-response-encoding-perl/current/t/01-file.t Thu Jul 30 19:38:43 2009
@@ -1,4 +1,3 @@
-#!perl
 #!perl -T
 
 use strict;
@@ -55,4 +54,8 @@
 $uri->path(File::Spec->catfile($cwd, "t", "t-null.html"));
 my $res = $ua->get($uri);
 die unless $res->is_success;
-is $res->encoding, undef, "res->encoding eq undef";
+if (defined $res->encoding){
+    is $res->encoding, "ascii", "res->encoding is ascii";
+}else{
+    ok !$res->encoding, "res->encoding is undef";
+}




More information about the Pkg-perl-cvs-commits mailing list