r66171 - in /branches/upstream/libhttp-parser-xs-perl/current: Changes META.yml inc/Module/Install/ReadmeFromPod.pm inc/Module/Install/TestTarget.pm lib/HTTP/Parser/XS.pm picohttpparser/picohttpparser.c picohttpparser/picohttpparser.h

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Fri Dec 24 05:44:41 UTC 2010


Author: jawnsy-guest
Date: Fri Dec 24 05:44:33 2010
New Revision: 66171

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=66171
Log:
[svn-upgrade] new version libhttp-parser-xs-perl (0.13)

Modified:
    branches/upstream/libhttp-parser-xs-perl/current/Changes
    branches/upstream/libhttp-parser-xs-perl/current/META.yml
    branches/upstream/libhttp-parser-xs-perl/current/inc/Module/Install/ReadmeFromPod.pm
    branches/upstream/libhttp-parser-xs-perl/current/inc/Module/Install/TestTarget.pm
    branches/upstream/libhttp-parser-xs-perl/current/lib/HTTP/Parser/XS.pm
    branches/upstream/libhttp-parser-xs-perl/current/picohttpparser/picohttpparser.c
    branches/upstream/libhttp-parser-xs-perl/current/picohttpparser/picohttpparser.h

Modified: branches/upstream/libhttp-parser-xs-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhttp-parser-xs-perl/current/Changes?rev=66171&op=diff
==============================================================================
--- branches/upstream/libhttp-parser-xs-perl/current/Changes (original)
+++ branches/upstream/libhttp-parser-xs-perl/current/Changes Fri Dec 24 05:44:33 2010
@@ -1,7 +1,10 @@
 Revision history for Perl extension HTTP::Parser::XS.
 
+0.13
+	- fix compile error on GCC < 3 (RT #63074)
+
 0.12
-	- fix undeclared dependency on URI::Escape (RC #62716 thanks to ANDK for reporting)
+	- fix undeclared dependency on URI::Escape (RT #62716)
 	- fix parsing of protocol version in the pure perl impl to exactly match that of XS
 
 0.11
@@ -11,7 +14,7 @@
 	- support for HTTP response parsing (by gfx,mala,tokuhirom)
 
 0.09
-	- improve compatibility (mainly Windows, RT #61133, thanks to Taro Nishino)
+	- improve compatibility (mainly Windows, RT #61133)
 
 0.08
 	- improve compatibility (mainly Solaris, thanks to gfx)
@@ -21,10 +24,10 @@
 
 0.06  Tue Feb 23 06:16:00 2010
 	- fix memory leak, add more checks (thanks to charsbar)
-	- prereq Test::More (see rt.cpan.org #54358)
+	- prereq Test::More (RT #54358)
 
 0.05  Fri Oct 23 21:12:00 2009
-	- no more (implicitly) depend on Exporter 5.63 (see http://rt.cpan.org/Public/Bug/Display.html?id=50607, thanks to ANDK for reporting)
+	- no more (implicitly) depend on Exporter 5.63 (RT #50607)
 
 0.04  Fri Oct 16 08:15:00 2009
 	- fix memory leak (thanks to nothingmuch for writing the patch)

Modified: branches/upstream/libhttp-parser-xs-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhttp-parser-xs-perl/current/META.yml?rev=66171&op=diff
==============================================================================
--- branches/upstream/libhttp-parser-xs-perl/current/META.yml (original)
+++ branches/upstream/libhttp-parser-xs-perl/current/META.yml Fri Dec 24 05:44:33 2010
@@ -21,4 +21,4 @@
     - t
 resources:
   license: http://dev.perl.org/licenses/
-version: 0.12
+version: 0.13

Modified: branches/upstream/libhttp-parser-xs-perl/current/inc/Module/Install/ReadmeFromPod.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhttp-parser-xs-perl/current/inc/Module/Install/ReadmeFromPod.pm?rev=66171&op=diff
==============================================================================
--- branches/upstream/libhttp-parser-xs-perl/current/inc/Module/Install/ReadmeFromPod.pm (original)
+++ branches/upstream/libhttp-parser-xs-perl/current/inc/Module/Install/ReadmeFromPod.pm Fri Dec 24 05:44:33 2010
@@ -1,36 +1,48 @@
 #line 1
 package Module::Install::ReadmeFromPod;
 
+use 5.006;
 use strict;
 use warnings;
 use base qw(Module::Install::Base);
 use vars qw($VERSION);
 
-$VERSION = '0.06';
+$VERSION = '0.12';
 
 sub readme_from {
   my $self = shift;
-  return unless $Module::Install::AUTHOR;
-  my $file = shift || return;
+  return unless $self->is_admin;
+
+  my $file = shift || $self->_all_from
+    or die "Can't determine file to make readme_from";
   my $clean = shift;
+
+  print "Writing README from $file\n";
+
   require Pod::Text;
   my $parser = Pod::Text->new();
   open README, '> README' or die "$!\n";
   $parser->output_fh( *README );
   $parser->parse_file( $file );
-  return 1 unless $clean;
-  $self->postamble(<<"END");
-distclean :: license_clean
+  if ($clean) {
+    $self->clean_files('README');
+  }
+  return 1;
+}
 
-license_clean:
-\t\$(RM_F) README
-END
-  return 1;
+sub _all_from {
+  my $self = shift;
+  return unless $self->admin->{extensions};
+  my ($metadata) = grep {
+    ref($_) eq 'Module::Install::Metadata';
+  } @{$self->admin->{extensions}};
+  return unless $metadata;
+  return $metadata->{values}{all_from} || '';
 }
 
 'Readme!';
 
 __END__
 
-#line 89
+#line 112
 

Modified: branches/upstream/libhttp-parser-xs-perl/current/inc/Module/Install/TestTarget.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhttp-parser-xs-perl/current/inc/Module/Install/TestTarget.pm?rev=66171&op=diff
==============================================================================
--- branches/upstream/libhttp-parser-xs-perl/current/inc/Module/Install/TestTarget.pm (original)
+++ branches/upstream/libhttp-parser-xs-perl/current/inc/Module/Install/TestTarget.pm Fri Dec 24 05:44:33 2010
@@ -3,7 +3,7 @@
 use 5.006_002;
 use strict;
 #use warnings; # XXX: warnings.pm produces a lot of 'redefine' warnings!
-our $VERSION = '0.11';
+our $VERSION = '0.15';
 
 use base qw(Module::Install::Base);
 use Config;
@@ -32,11 +32,17 @@
 sub test_target {
     my ($self, $target, %args) = @_;
     croak 'target must be spesiced at test_target()' unless $target;
-    my $alias = $args{alias}  || '';
+    my $alias = "\n";
+
+    if($args{alias}) {
+        $alias .= qq{$args{alias} :: $target\n\n};
+    }
+    if($Module::Install::AUTHOR && $args{alias_for_author}) {
+        $alias .= qq{$args{alias_for_author} :: $target\n\n};
+    }
 
     my $test = _assemble(_build_command_parts(%args));
 
-    $alias = $alias ? qq{\n$alias :: $target\n\n} : qq{\n};
     $self->postamble(
           $alias
         . qq{$target :: pure_all\n}
@@ -47,7 +53,7 @@
 sub _build_command_parts {
     my %args = @_;
 
-    #XXX: _build_command_parts() will be called first, so we put ithere
+    #XXX: _build_command_parts() will be called first, so we put it here
     unless(defined $ORIG_TEST_VIA_HARNESS) {
         $ORIG_TEST_VIA_HARNESS = MY->can('test_via_harness');
         no warnings 'redefine';
@@ -63,9 +69,14 @@
     my %test;
     $test{includes} = @{$args{includes}} ? join '', map { qq|"-I$_" | } @{$args{includes}} : '';
     $test{load_modules}  = @{$args{load_modules}}  ? join '', map { qq|"-M$_" | } @{$args{load_modules}}  : '';
-    $test{tests}    = @{$args{tests}}    ? join '', map { qq|"$_" |   } @{$args{tests}}    : '$(TEST_FILES)';
+
+    $test{tests} =  @{$args{tests}}
+        ? join '', map { qq|"$_" | } @{$args{tests}}
+        : '$(TEST_FILES)';
+
     for my $key (qw/run_on_prepare run_on_finalize/) {
-        $test{$key} = @{$args{$key}} ? join '', map { qq|do '$_'; | } @{$args{$key}} : '';
+        $test{$key} = @{$args{$key}} ? join '', map { qq|do { local \$@; do '$_'; die \$@ if \$@ }; | } @{$args{$key}} : '';
+        $test{$key} = _quote($test{$key});
     }
     for my $key (qw/insert_on_prepare insert_on_finalize/) {
         my $codes = join '', map { _build_funcall($_) } @{$args{$key}};
@@ -95,10 +106,12 @@
     $code =~ s/\$/\\\$\$/g;
     $code =~ s/"/\\"/g;
     $code =~ s/\n/ /g;
-    if ($^O eq 'MSWin32' and $Config{make} eq 'dmake') {
+    if ($^O eq 'MSWin32') {
         $code =~ s/\\\$\$/\$\$/g;
-        $code =~ s/{/{{/g;
-        $code =~ s/}/}}/g;
+        if ($Config{make} eq 'dmake') {
+            $code =~ s/{/{{/g;
+            $code =~ s/}/}}/g;
+        }
     }
     return $code;
 }
@@ -117,12 +130,16 @@
     $command =~ s/("- \S+? ")/$args{includes}$args{load_modules}$1/xms;
 
     # inject snipetts in the one-liner
-    $command =~ s{("-e" \s+ ") (.+) (")}{
+    $command =~ s{
+        ( "-e" \s+ ")          # start the one liner
+        ( (?: [^"] | \\ . )+ ) # body of the one liner
+        ( " )                  # end the one liner
+     }{
         join '', $1,
             $args{env},
             $args{run_on_prepare},
             $args{insert_on_prepare},
-            $2,
+            "$2; ",
             $args{run_on_finalize},
             $args{insert_on_finalize},
             $3,
@@ -141,4 +158,4 @@
 1;
 __END__
 
-#line 372
+#line 393

Modified: branches/upstream/libhttp-parser-xs-perl/current/lib/HTTP/Parser/XS.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhttp-parser-xs-perl/current/lib/HTTP/Parser/XS.pm?rev=66171&op=diff
==============================================================================
--- branches/upstream/libhttp-parser-xs-perl/current/lib/HTTP/Parser/XS.pm (original)
+++ branches/upstream/libhttp-parser-xs-perl/current/lib/HTTP/Parser/XS.pm Fri Dec 24 05:44:33 2010
@@ -19,7 +19,7 @@
     HEADERS_AS_ARRAYREF =>2,    # Ordered ArrayRef : [ name, value, name2, value2 ... ]
 };
 
-our $VERSION = '0.12';
+our $VERSION = '0.13';
 
 our $BACKEND;
 

Modified: branches/upstream/libhttp-parser-xs-perl/current/picohttpparser/picohttpparser.c
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhttp-parser-xs-perl/current/picohttpparser/picohttpparser.c?rev=66171&op=diff
==============================================================================
--- branches/upstream/libhttp-parser-xs-perl/current/picohttpparser/picohttpparser.c (original)
+++ branches/upstream/libhttp-parser-xs-perl/current/picohttpparser/picohttpparser.c Fri Dec 24 05:44:33 2010
@@ -1,7 +1,9 @@
 #include <stddef.h>
 #include "picohttpparser.h"
 
-#ifdef __GNUC__
+/* $Id: 9cd312b6fcefb127a2edf2b2e60702d3f5b9abf7 $ */
+
+#if __GNUC__ >= 3
 # define likely(x)	__builtin_expect(!!(x), 1)
 # define unlikely(x)	__builtin_expect(!!(x), 0)
 #else
@@ -28,7 +30,7 @@
       CHECK_EOF();				       \
       if (*buf == ' ') {			       \
 	break;					       \
-      } else if (*buf == '\r' || *buf == '\n') {       \
+      } else if (*buf == '\015' || *buf == '\012') {   \
 	*ret = -1;				       \
 	return NULL;				       \
       }						       \
@@ -47,27 +49,27 @@
     if (likely(buf_end - buf >= 16)) {
       unsigned i;
       for (i = 0; i < 16; i++, ++buf) {
-	if (unlikely((unsigned char)*buf <= '\r')
-	    && (*buf == '\r' || *buf == '\n')) {
+	if (unlikely((unsigned char)*buf <= '\015')
+	    && (*buf == '\015' || *buf == '\012')) {
 	  goto EOL_FOUND;
 	}
       }
     } else {
       for (; ; ++buf) {
 	CHECK_EOF();
-	if (unlikely((unsigned char)*buf <= '\r')
-	    && (*buf == '\r' || *buf == '\n')) {
+	if (unlikely((unsigned char)*buf <= '\015')
+	    && (*buf == '\015' || *buf == '\012')) {
 	  goto EOL_FOUND;
 	}
       }
     }
   }
  EOL_FOUND:
-  if (*buf == '\r') {
-    ++buf;
-    EXPECT_CHAR('\n');
+  if (*buf == '\015') {
+    ++buf;
+    EXPECT_CHAR('\012');
     *token_len = buf - 2 - token_start;
-  } else { /* should be: *buf == '\n' */
+  } else { /* should be: *buf == '\012' */
     *token_len = buf - token_start;
     ++buf;
   }
@@ -84,12 +86,12 @@
   
   while (1) {
     CHECK_EOF();
-    if (*buf == '\r') {
+    if (*buf == '\015') {
       ++buf;
       CHECK_EOF();
-      EXPECT_CHAR('\n');
+      EXPECT_CHAR('\012');
       ++ret_cnt;
-    } else if (*buf == '\n') {
+    } else if (*buf == '\012') {
       ++buf;
       ++ret_cnt;
     } else {
@@ -145,11 +147,11 @@
 {
   for (; ; ++*num_headers) {
     CHECK_EOF();
-    if (*buf == '\r') {
-      ++buf;
-      EXPECT_CHAR('\n');
+    if (*buf == '\015') {
+      ++buf;
+      EXPECT_CHAR('\012');
       break;
-    } else if (*buf == '\n') {
+    } else if (*buf == '\012') {
       ++buf;
       break;
     }
@@ -199,10 +201,10 @@
 {
   /* skip first empty line (some clients add CRLF after POST content) */
   CHECK_EOF();
-  if (*buf == '\r') {
-    ++buf;
-    EXPECT_CHAR('\n');
-  } else if (*buf == '\n') {
+  if (*buf == '\015') {
+    ++buf;
+    EXPECT_CHAR('\012');
+  } else if (*buf == '\012') {
     ++buf;
   }
   
@@ -214,10 +216,10 @@
   if ((buf = parse_http_version(buf, buf_end, minor_version, ret)) == NULL) {
     return NULL;
   }
-  if (*buf == '\r') {
-    ++buf;
-    EXPECT_CHAR('\n');
-  } else if (*buf == '\n') {
+  if (*buf == '\015') {
+    ++buf;
+    EXPECT_CHAR('\012');
+  } else if (*buf == '\012') {
     ++buf;
   } else {
     *ret = -1;

Modified: branches/upstream/libhttp-parser-xs-perl/current/picohttpparser/picohttpparser.h
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhttp-parser-xs-perl/current/picohttpparser/picohttpparser.h?rev=66171&op=diff
==============================================================================
--- branches/upstream/libhttp-parser-xs-perl/current/picohttpparser/picohttpparser.h (original)
+++ branches/upstream/libhttp-parser-xs-perl/current/picohttpparser/picohttpparser.h Fri Dec 24 05:44:33 2010
@@ -1,5 +1,7 @@
 #ifndef picohttpparser_h
 #define picohttpparser_h
+
+/* $Id: e8df3d19ac99b0e989e41f8281fd710fa94d17d4 $ */
 
 #ifdef __cplusplus
 extern "C" {




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