[libhttp-entity-parser-perl] 06/08: checking in changes from "minil build"
gregor herrmann
gregoa at debian.org
Sun Oct 23 00:23:51 UTC 2016
This is an automated email from the git hooks/post-receive script.
gregoa pushed a commit to tag 0.18
in repository libhttp-entity-parser-perl.
commit 3cab79409f54c83924d22bd3b15f2e3349e3f8f1
Author: Karen Etheridge <ether at cpan.org>
Date: Sat Oct 1 21:34:27 2016 -0700
checking in changes from "minil build"
---
Build.PL | 57 ++-------------------------------------------------------
META.json | 15 ++++++++-------
README.md | 28 ++++++++++++++--------------
3 files changed, 24 insertions(+), 76 deletions(-)
diff --git a/Build.PL b/Build.PL
index 42e060e..16855c4 100644
--- a/Build.PL
+++ b/Build.PL
@@ -4,62 +4,9 @@
# =========================================================================
use 5.008_001;
-
use strict;
-use warnings;
-use utf8;
-
-use Module::Build;
-use File::Basename;
-use File::Spec;
-
-my %args = (
- license => 'perl',
- dynamic_config => 0,
-
- configure_requires => {
- 'Module::Build' => 0.38,
- },
-
- name => 'HTTP-Entity-Parser',
- module_name => 'HTTP::Entity::Parser',
- allow_pureperl => 0,
-
- script_files => [glob('script/*'), glob('bin/*')],
- c_source => [qw()],
- PL_files => {},
-
- test_files => ((-d '.git' || $ENV{RELEASE_TESTING}) && -d 'xt') ? 't/ xt/' : 't/',
- recursive_test_files => 1,
-
-
-);
-if (-d 'share') {
- $args{share_dir} = 'share';
-}
-
-my $builder = Module::Build->subclass(
- class => 'MyBuilder',
- code => q{
- sub ACTION_distmeta {
- die "Do not run distmeta. Install Minilla and `minil install` instead.\n";
- }
- sub ACTION_installdeps {
- die "Do not run installdeps. Run `cpanm --installdeps .` instead.\n";
- }
- }
-)->new(%args);
-$builder->create_build_script();
-
-use File::Copy;
-print "cp META.json MYMETA.json\n";
-copy("META.json","MYMETA.json") or die "Copy failed(META.json): $!";
+use Module::Build::Tiny 0.035;
-if (-f 'META.yml') {
- print "cp META.yml MYMETA.yml\n";
- copy("META.yml","MYMETA.yml") or die "Copy failed(META.yml): $!";
-} else {
- print "There is no META.yml... You may install this module from the repository...\n";
-}
+Build_PL();
diff --git a/META.json b/META.json
index 2a2bbee..3dca1c9 100644
--- a/META.json
+++ b/META.json
@@ -4,13 +4,13 @@
"Masahiro Nagano <kazeburo at gmail.com>"
],
"dynamic_config" : 0,
- "generated_by" : "Minilla/v2.4.1, CPAN::Meta::Converter version 2.150005",
+ "generated_by" : "Minilla/v3.0.4, CPAN::Meta::Converter version 2.150010",
"license" : [
"perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
- "version" : "2"
+ "version" : 2.0
},
"name" : "HTTP-Entity-Parser",
"no_index" : {
@@ -28,7 +28,7 @@
"prereqs" : {
"configure" : {
"requires" : {
- "Module::Build" : "0.38"
+ "Module::Build::Tiny" : "0.035"
}
},
"develop" : {
@@ -45,7 +45,8 @@
"Encode" : "0",
"File::Temp" : "0",
"HTTP::MultiPartParser" : "0",
- "JSON" : "2",
+ "Hash::MultiValue" : "0",
+ "JSON::MaybeXS" : "1.003007",
"Module::Load" : "0",
"Stream::Buffered" : "0",
"WWW::Form::UrlEncoded" : "0.23",
@@ -60,7 +61,6 @@
"Cwd" : "0",
"File::Spec::Functions" : "0",
"HTTP::Message" : "6",
- "Hash::MultiValue" : "0",
"Test::More" : "0.98"
}
}
@@ -79,7 +79,8 @@
},
"version" : "0.17",
"x_contributors" : [
- "moznion <moznion at gmail.com>"
+ "moznion <moznion at gmail.com>",
+ "Karen Etheridge <ether at cpan.org>"
],
- "x_serialization_backend" : "JSON::PP version 2.27203"
+ "x_serialization_backend" : "JSON::MaybeXS version 1.003007"
}
diff --git a/README.md b/README.md
index 9939274..51dcdba 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@ HTTP::Entity::Parser - PSGI compliant HTTP Entity Parser
# SYNOPSIS
use HTTP::Entity::Parser;
-
+
my $parser = HTTP::Entity::Parser->new;
$parser->register('application/x-www-form-urlencoded','HTTP::Entity::Parser::UrlEncoded');
$parser->register('multipart/form-data','HTTP::Entity::Parser::MultiPart');
@@ -18,10 +18,10 @@ HTTP::Entity::Parser - PSGI compliant HTTP Entity Parser
# DESCRIPTION
-HTTP::Entity::Parser is PSGI compliant HTTP Entity parser. This module also has compatibility
-with [HTTP::Body](https://metacpan.org/pod/HTTP::Body). Unlike HTTP::Body, HTTP::Entity::Parser reads HTTP entity from
-PSGI's env `$env->{'psgi.input'}` and parse it.
-This module support application/x-www-form-urlencoded, multipart/form-data and application/json.
+HTTP::Entity::Parser is a PSGI-compliant HTTP Entity parser. This module also is compatible
+with [HTTP::Body](https://metacpan.org/pod/HTTP::Body). Unlike HTTP::Body, HTTP::Entity::Parser reads HTTP entities from
+PSGI's environment `$env->{'psgi.input'}` and parses it.
+This module supports application/x-www-form-urlencoded, multipart/form-data and application/json.
# METHODS
@@ -31,7 +31,7 @@ This module support application/x-www-form-urlencoded, multipart/form-data and a
- buffer\_length
- buffer length, HTTP::Entity::Parser read from psgi.input. 16384 by default.
+ The buffer length that HTTP::Entity::Parser reads from psgi.input. 16384 by default.
- register($content\_type:String, $class:String, $opts:HashRef)
@@ -41,27 +41,27 @@ This module support application/x-www-form-urlencoded, multipart/form-data and a
$parser->register('multipart/form-data','HTTP::Entity::Parser::MultiPart');
$parser->register('application/json','HTTP::Entity::Parser::JSON');
- If the request content\_type match registered type, HTTP::Entity::Parser uses registered
+ If the request content\_type matches the registered type, HTTP::Entity::Parser uses the registered
parser class. If content\_type does not match any registered type, HTTP::Entity::Parser::OctetStream is used.
- parse($env:HashRef)
- parse HTTP entity from PSGI's env.
+ parse HTTP entities from PSGI's env.
my ( $params:ArrayRef, $uploads:ArrayRef) = $parser->parse($env);
- `$param` is key-value pair list.
+ `$param` is a key-value pair list.
my ( $params, $uploads) = $parser->parse($env);
my $body_parameters = Hash::MultiValue->new(@$params);
- `$uploads` is ArrayRef of HashRef.
+ `$uploads` is an ArrayRef of HashRef.
my ( $params, $uploads) = $parser->parse($env);
warn Dumper($uploads->[0]);
{
"name" => "upload", #field name
- "headeres" => [
+ "headers" => [
"Content-Type" => "application/octet-stream",
"Content-Disposition" => "form-data; name=\"upload\"; filename=\"hello.pl\""
],
@@ -70,7 +70,7 @@ This module support application/x-www-form-urlencoded, multipart/form-data and a
"tempname" => "/tmp/XXXXX", # path to the temporary file where uploaded file is saved
}
- use with Plack::Request::Upload
+ When used with [Plack::Request::Upload](https://metacpan.org/pod/Plack::Request::Upload):
my ( $params, $uploads) = $parser->parse($env);
my $upload_hmv = Hash::MultiValue->new();
@@ -98,9 +98,9 @@ This module support application/x-www-form-urlencoded, multipart/form-data and a
- JSON
- For `application/json`. This parser decode JSON body automatically.
+ For `application/json`. This parser decodes JSON body automatically.
- It is convenient to use with Ajax form.
+ It is convenient to use with Ajax forms.
# WHAT'S DIFFERENT FROM HTTP::Body
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libhttp-entity-parser-perl.git
More information about the Pkg-perl-cvs-commits
mailing list