Permalink
Browse files

convert to Milla

  • Loading branch information...
1 parent 14d9acf commit 4dc31239449655eaeecc68016fd3127bcf3c9ea2 @miyagawa miyagawa committed Sep 18, 2013
Showing with 548 additions and 179 deletions.
  1. +7 −0 .gitignore
  2. +0 −2 .shipit
  3. +4 −0 Changes
  4. +379 −0 LICENSE
  5. +0 −29 MANIFEST
  6. +0 −22 MANIFEST.SKIP
  7. +71 −0 META.json
  8. +67 −17 Makefile.PL
  9. +0 −98 README
  10. +10 −10 README.mkdn → README.md
  11. +6 −0 cpanfile
  12. +3 −0 dist.ini
  13. +1 −1 lib/CGI/Emulate/PSGI.pm
View
@@ -4,3 +4,10 @@ inc/
pm_to_blib
*~
blib
+/cgi-emulate-psgi-*
+/.build
+/_build_params
+/Build
+!Build/
+!META.json
+!LICENSE
View
@@ -1,2 +0,0 @@
-steps = FindVersion, ChangeVersion, CheckChangeLog, DistTest, Commit, Tag, MakeDist, UploadCPAN
-git.push_to = origin
View
@@ -1,3 +1,7 @@
+{{$NEXT}}
+ - Use tied handle for STDIN/STDERR (#3)
+ - Convert to Milla
+
0.15 Fri Oct 19 15:09:17 PDT 2012
- Repackage with the latest Module::Install
View
379 LICENSE

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -1,29 +0,0 @@
-Changes
-inc/Module/Install.pm
-inc/Module/Install/AuthorTests.pm
-inc/Module/Install/Base.pm
-inc/Module/Install/Can.pm
-inc/Module/Install/Fetch.pm
-inc/Module/Install/Include.pm
-inc/Module/Install/Makefile.pm
-inc/Module/Install/Metadata.pm
-inc/Module/Install/ReadmeFromPod.pm
-inc/Module/Install/ReadmeMarkdownFromPod.pm
-inc/Module/Install/Win32.pm
-inc/Module/Install/WriteAll.pm
-inc/Pod/Markdown.pm
-inc/Test/More.pm
-inc/Test/Requires.pm
-lib/CGI/Emulate/PSGI.pm
-lib/CGI/Parse/PSGI.pm
-Makefile.PL
-MANIFEST This list of files
-META.yml
-README
-README.mkdn
-t/00_compile.t
-t/01_simple.t
-t/02_parse.t
-t/03_socket.t
-t/04_utf8.t
-t/05_lint.t
View
@@ -1,22 +0,0 @@
-\bRCS\b
-\bCVS\b
-^MANIFEST\.
-^Makefile$
-~$
-^#
-\.old$
-^blib/
-^pm_to_blib
-^MakeMaker-\d
-\.gz$
-\.cvsignore
-^t/9\d_.*\.t
-^t/perlcritic
-^tools/
-\.svn/
-^[^/]+\.yaml$
-^[^/]+\.pl$
-^\.shipit$
-\.git/
-\.gitignore$
-MYMETA
View
@@ -0,0 +1,71 @@
+{
+ "abstract" : "PSGI adapter for CGI",
+ "author" : [
+ "Tokuhiro Matsuno <tokuhirom@cpan.org>"
+ ],
+ "dynamic_config" : 0,
+ "generated_by" : "Dist::Milla version v1.0.4, Dist::Zilla version 4.300038, CPAN::Meta::Converter version 2.132510",
+ "license" : [
+ "perl_5"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : "2"
+ },
+ "name" : "CGI-Emulate-PSGI",
+ "no_index" : {
+ "directory" : [
+ "t",
+ "xt",
+ "inc",
+ "share",
+ "eg",
+ "examples"
+ ]
+ },
+ "prereqs" : {
+ "configure" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "6.30"
+ }
+ },
+ "develop" : {
+ "requires" : {
+ "Test::Pod" : "1.41"
+ }
+ },
+ "runtime" : {
+ "requires" : {
+ "HTTP::Response" : "0",
+ "perl" : "5.00801"
+ }
+ },
+ "test" : {
+ "requires" : {
+ "Test::More" : "0.88"
+ }
+ }
+ },
+ "release_status" : "stable",
+ "resources" : {
+ "bugtracker" : {
+ "web" : "https://github.com/tokuhirom/p5-cgi-emulate-psgi/issues"
+ },
+ "homepage" : "https://github.com/tokuhirom/p5-cgi-emulate-psgi",
+ "repository" : {
+ "type" : "git",
+ "url" : "https://github.com/tokuhirom/p5-cgi-emulate-psgi.git",
+ "web" : "https://github.com/tokuhirom/p5-cgi-emulate-psgi"
+ }
+ },
+ "version" : "0.15",
+ "x_contributors" : [
+ "Bastian Blank <waldi@debian.org>",
+ "Clay Fouts <cfouts@liblime.com>",
+ "Kazuho Oku <kazuhooku@gmail.com>",
+ "Mark Stosberg <mark@stosberg.com>",
+ "Tatsuhiko Miyagawa <miyagawa@gmail.com>",
+ "Tokuhiro Matsuno <tokuhirom@gmail.com>"
+ ]
+}
+
View
@@ -1,17 +1,67 @@
-sub readme_markdown_from { }
-sub readme_from { }
-
-use inc::Module::Install;
-name 'CGI-Emulate-PSGI';
-all_from 'lib/CGI/Emulate/PSGI.pm';
-
-requires 'HTTP::Response';
-tests 't/*.t t/*/*.t t/*/*/*.t';
-author_tests 'xt';
-
-readme_from 'lib/CGI/Emulate/PSGI.pm';
-readme_markdown_from 'lib/CGI/Emulate/PSGI.pm';
-build_requires 'Test::More' => 0.94;
-test_requires 'Test::Requires';
-auto_include;
-WriteAll;
+
+use strict;
+use warnings;
+
+use 5.008010;
+
+use ExtUtils::MakeMaker 6.30;
+
+
+
+my %WriteMakefileArgs = (
+ "ABSTRACT" => "PSGI adapter for CGI",
+ "AUTHOR" => "Tokuhiro Matsuno <tokuhirom\@cpan.org>",
+ "BUILD_REQUIRES" => {},
+ "CONFIGURE_REQUIRES" => {
+ "ExtUtils::MakeMaker" => "6.30"
+ },
+ "DISTNAME" => "CGI-Emulate-PSGI",
+ "EXE_FILES" => [],
+ "LICENSE" => "perl",
+ "NAME" => "CGI::Emulate::PSGI",
+ "PREREQ_PM" => {
+ "HTTP::Response" => 0
+ },
+ "TEST_REQUIRES" => {
+ "Test::More" => "0.88"
+ },
+ "VERSION" => "0.15",
+ "test" => {
+ "TESTS" => "t/*.t"
+ }
+);
+
+
+unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
+ my $tr = delete $WriteMakefileArgs{TEST_REQUIRES};
+ my $br = $WriteMakefileArgs{BUILD_REQUIRES};
+ for my $mod ( keys %$tr ) {
+ if ( exists $br->{$mod} ) {
+ $br->{$mod} = $tr->{$mod} if $tr->{$mod} > $br->{$mod};
+ }
+ else {
+ $br->{$mod} = $tr->{$mod};
+ }
+ }
+}
+
+unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {
+ my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};
+ my $pp = $WriteMakefileArgs{PREREQ_PM};
+ for my $mod ( keys %$br ) {
+ if ( exists $pp->{$mod} ) {
+ $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod};
+ }
+ else {
+ $pp->{$mod} = $br->{$mod};
+ }
+ }
+}
+
+delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
+ unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
+
+WriteMakefile(%WriteMakefileArgs);
+
+
+
View
98 README
@@ -1,98 +0,0 @@
-NAME
- CGI::Emulate::PSGI - PSGI adapter for CGI
-
-SYNOPSIS
- my $app = CGI::Emulate::PSGI->handler(sub {
- # Existing CGI code
- });
-
-DESCRIPTION
- This module allows an application designed for the CGI environment to
- run in a PSGI environment, and thus on any of the backends that PSGI
- supports.
-
- It works by translating the environment provided by the PSGI
- specification to one expected by the CGI specification. Likewise, it
- captures output as it would be prepared for the CGI standard, and
- translates it to the format expected for the PSGI standard using
- CGI::Parse::PSGI module.
-
-CGI.pm
- If your application uses CGI, be sure to cleanup the global variables in
- the handler loop yourself, so:
-
- my $app = CGI::Emulate::PSGI->handler(sub {
- use CGI;
- CGI::initialize_globals();
- my $q = CGI->new;
- # ...
- });
-
- Otherwise previous request variables will be reused in the new requests.
-
- Alternatively, you can install and use CGI::Compile from CPAN and
- compiles your existing CGI scripts into a sub that is perfectly ready to
- be converted to PSGI application using this module.
-
- my $sub = CGI::Compile->compile("/path/to/script.cgi");
- my $app = CGI::Emulate::PSGI->handler($sub);
-
- This will take care of assigning an unique namespace for each script
- etc. See CGI::Compile for details.
-
- You can also consider using CGI::PSGI but that would require you to
- slightly change your code from:
-
- my $q = CGI->new;
- # ...
- print $q->header, $output;
-
- into:
-
- use CGI::PSGI;
-
- my $app = sub {
- my $env = shift;
- my $q = CGI::PSGI->new($env);
- # ...
- return [ $q->psgi_header, [ $output ] ];
- };
-
- See CGI::PSGI for details.
-
-METHODS
- handler
- my $app = CGI::Emulate::PSGI->handler($code);
-
- Creates a PSGI application code reference out of CGI code reference.
-
- emulate_environment
- my %env = CGI::Emulate::PSGI->emulate_environment($env);
-
- Creates an environment hash out of PSGI environment hash. If your
- code or framework just needs an environment variable emulation, use
- this method like:
-
- local %ENV = (%ENV, CGI::Emulate::PSGI->emulate_environment($env));
- # run your application
-
- If you use "handler" method to create a PSGI environment hash, this
- is automatically called in the created application.
-
-AUTHOR
- Tokuhiro Matsuno <tokuhirom@cpan.org>
-
- Tatsuhiko Miyagawa
-
-COPYRIGHT AND LICENSE
- Copyright (c) 2009-2010 by tokuhirom.
-
- This program is free software; you can redistribute it and/or modify it
- under the same terms as Perl itself.
-
- The full text of the license can be found in the LICENSE file included
- with this module.
-
-SEE ALSO
- PSGI CGI::Compile CGI::PSGI Plack CGI::Parse::PSGI
-
View
@@ -69,23 +69,23 @@ See [CGI::PSGI](http://search.cpan.org/perldoc?CGI::PSGI) for details.
- handler
- my $app = CGI::Emulate::PSGI->handler($code);
+ my $app = CGI::Emulate::PSGI->handler($code);
-Creates a PSGI application code reference out of CGI code reference.
+ Creates a PSGI application code reference out of CGI code reference.
- emulate\_environment
- my %env = CGI::Emulate::PSGI->emulate_environment($env);
+ my %env = CGI::Emulate::PSGI->emulate_environment($env);
-Creates an environment hash out of PSGI environment hash. If your code
-or framework just needs an environment variable emulation, use this
-method like:
+ Creates an environment hash out of PSGI environment hash. If your code
+ or framework just needs an environment variable emulation, use this
+ method like:
- local %ENV = (%ENV, CGI::Emulate::PSGI->emulate_environment($env));
- # run your application
+ local %ENV = (%ENV, CGI::Emulate::PSGI->emulate_environment($env));
+ # run your application
-If you use `handler` method to create a PSGI environment hash, this
-is automatically called in the created application.
+ If you use `handler` method to create a PSGI environment hash, this
+ is automatically called in the created application.
# AUTHOR
View
@@ -0,0 +1,6 @@
+requires 'HTTP::Response';
+requires 'perl', '5.00801';
+
+on test => sub {
+ requires 'Test::More', 0.88;
+};
View
@@ -0,0 +1,3 @@
+name = CGI-Emulate-PSGI
+[@Milla]
+installer = MakeMaker
View
@@ -6,7 +6,7 @@ use POSIX 'SEEK_SET';
use IO::File ();
use SelectSaver;
use Carp qw(croak);
-use 5.00800;
+use 5.008001;
our $VERSION = '0.15';

0 comments on commit 4dc3123

Please sign in to comment.