Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Convert to Milla

  • Loading branch information...
commit 7272d5d7b385b3ec3d459450bf0f18ea15e3fd83 1 parent 237cfbb
@miyagawa miyagawa authored
View
9 .gitignore
@@ -1,14 +1,11 @@
META.yml
Makefile
-inc/
-!t/Plack-Util/inc/
pm_to_blib
blib
*~
-.*
!.gitignore
-!.shipit
MYMETA.*
.proverc
-pod2htmd.tmp
-pod2htmi.tmp
+/Plack-*
+!META.json
+/.build
View
2  .shipit
@@ -1,2 +0,0 @@
-steps = FindVersion, ChangeAllVersions, CheckChangeLog, DistTest, Commit, Tag, MakeDist, UploadCPAN
-git.push_to = origin
View
273 MANIFEST
@@ -1,273 +0,0 @@
-benchmarks/ab.pl
-benchmarks/fcgi.pl
-bin/plackup
-Changes
-eg/dot-psgi/cgi-pm.psgi
-eg/dot-psgi/cgi-script.psgi
-eg/dot-psgi/Dumper.psgi
-eg/dot-psgi/echo-stream-sync.psgi
-eg/dot-psgi/echo-stream.psgi
-eg/dot-psgi/echo.psgi
-eg/dot-psgi/error.psgi
-eg/dot-psgi/Hello.psgi
-eg/dot-psgi/image.psgi
-eg/dot-psgi/nonblock-hello.psgi
-eg/dot-psgi/plack-req.psgi
-eg/dot-psgi/runnable.psgi
-eg/dot-psgi/slowapp.psgi
-eg/dot-psgi/static.psgi
-eg/dot-psgi/static/index.html
-eg/dot-psgi/static/test.css
-eg/dot-psgi/static/test.js
-eg/dot-psgi/twitter-stream.psgi
-inc/Module/Install.pm
-inc/Module/Install/Authority.pm
-inc/Module/Install/AuthorTests.pm
-inc/Module/Install/Base.pm
-inc/Module/Install/Can.pm
-inc/Module/Install/Fetch.pm
-inc/Module/Install/Makefile.pm
-inc/Module/Install/Metadata.pm
-inc/Module/Install/ReadmeFromPod.pm
-inc/Module/Install/Repository.pm
-inc/Module/Install/Scripts.pm
-inc/Module/Install/Share.pm
-inc/Module/Install/Win32.pm
-inc/Module/Install/WriteAll.pm
-lib/HTTP/Message/PSGI.pm
-lib/HTTP/Server/PSGI.pm
-lib/Plack.pm
-lib/Plack/App/Cascade.pm
-lib/Plack/App/CGIBin.pm
-lib/Plack/App/Directory.pm
-lib/Plack/App/File.pm
-lib/Plack/App/PSGIBin.pm
-lib/Plack/App/URLMap.pm
-lib/Plack/App/WrapCGI.pm
-lib/Plack/Builder.pm
-lib/Plack/Component.pm
-lib/Plack/Handler.pm
-lib/Plack/Handler/Apache1.pm
-lib/Plack/Handler/Apache2.pm
-lib/Plack/Handler/Apache2/Registry.pm
-lib/Plack/Handler/CGI.pm
-lib/Plack/Handler/FCGI.pm
-lib/Plack/Handler/HTTP/Server/PSGI.pm
-lib/Plack/Handler/HTTP/Server/Simple.pm
-lib/Plack/Handler/Standalone.pm
-lib/Plack/HTTPParser.pm
-lib/Plack/HTTPParser/PP.pm
-lib/Plack/Loader.pm
-lib/Plack/Loader/Delayed.pm
-lib/Plack/Loader/Restarter.pm
-lib/Plack/Loader/Shotgun.pm
-lib/Plack/Middleware.pm
-lib/Plack/Middleware/AccessLog.pm
-lib/Plack/Middleware/AccessLog/Timed.pm
-lib/Plack/Middleware/Auth/Basic.pm
-lib/Plack/Middleware/BufferedStreaming.pm
-lib/Plack/Middleware/Chunked.pm
-lib/Plack/Middleware/Conditional.pm
-lib/Plack/Middleware/ConditionalGET.pm
-lib/Plack/Middleware/ContentLength.pm
-lib/Plack/Middleware/ContentMD5.pm
-lib/Plack/Middleware/ErrorDocument.pm
-lib/Plack/Middleware/Head.pm
-lib/Plack/Middleware/HTTPExceptions.pm
-lib/Plack/Middleware/IIS6ScriptNameFix.pm
-lib/Plack/Middleware/IIS7KeepAliveFix.pm
-lib/Plack/Middleware/JSONP.pm
-lib/Plack/Middleware/LighttpdScriptNameFix.pm
-lib/Plack/Middleware/Lint.pm
-lib/Plack/Middleware/Log4perl.pm
-lib/Plack/Middleware/LogDispatch.pm
-lib/Plack/Middleware/NullLogger.pm
-lib/Plack/Middleware/RearrangeHeaders.pm
-lib/Plack/Middleware/Recursive.pm
-lib/Plack/Middleware/Refresh.pm
-lib/Plack/Middleware/Runtime.pm
-lib/Plack/Middleware/SimpleContentFilter.pm
-lib/Plack/Middleware/SimpleLogger.pm
-lib/Plack/Middleware/StackTrace.pm
-lib/Plack/Middleware/Static.pm
-lib/Plack/Middleware/XFramework.pm
-lib/Plack/Middleware/XSendfile.pm
-lib/Plack/MIME.pm
-lib/Plack/Request.pm
-lib/Plack/Request/Upload.pm
-lib/Plack/Response.pm
-lib/Plack/Runner.pm
-lib/Plack/TempBuffer.pm
-lib/Plack/Test.pm
-lib/Plack/Test/MockHTTP.pm
-lib/Plack/Test/Server.pm
-lib/Plack/Test/Suite.pm
-lib/Plack/Util.pm
-lib/Plack/Util/Accessor.pm
-Makefile.PL
-MANIFEST This list of files
-META.yml
-README
-script/bootstrap
-share/#foo
-share/baybridge.jpg
-share/face.jpg
-t/00_compile.t
-t/FCGIUtils.pm
-t/HTTP-Message-PSGI/content_length.t
-t/HTTP-Message-PSGI/empty_streamed_response.t
-t/HTTP-Message-PSGI/host.t
-t/HTTP-Message-PSGI/path_info.t
-t/HTTP-Message-PSGI/utf8_req.t
-t/HTTP-Server-PSGI/harakiri.t
-t/HTTP-Server-PSGI/post.t
-t/Plack-Builder/builder.t
-t/Plack-Builder/mount.t
-t/Plack-Builder/oo_interface.t
-t/Plack-Handler/apache1.t
-t/Plack-Handler/apache2-registry.t
-t/Plack-Handler/apache2.t
-t/Plack-Handler/cgi.t
-t/Plack-Handler/fcgi.t
-t/Plack-Handler/http_server_simple.t
-t/Plack-Handler/output_encoding.t
-t/Plack-Handler/standalone.t
-t/Plack-Handler/try_mangle.pl
-t/Plack-HTTPParser-PP/simple.t
-t/Plack-Loader/auto.t
-t/Plack-Loader/auto_fallback.t
-t/Plack-Loader/delayed.t
-t/Plack-Loader/restarter.t
-t/Plack-Loader/restarter_valid.t
-t/Plack-Loader/shotgun.t
-t/Plack-Middleware/access_log.t
-t/Plack-Middleware/access_log_timed.t
-t/Plack-Middleware/access_log_value_zero.t
-t/Plack-Middleware/auth_basic.t
-t/Plack-Middleware/auth_basic_env.t
-t/Plack-Middleware/auth_basic_simple.t
-t/Plack-Middleware/bufferedstreaming.t
-t/Plack-Middleware/cascade/basic.t
-t/Plack-Middleware/cascade/streaming.t
-t/Plack-Middleware/cgi-bin/cgi_dir.cgi
-t/Plack-Middleware/cgi-bin/hello.cgi
-t/Plack-Middleware/cgi-bin/hello.py
-t/Plack-Middleware/cgi-bin/hello2.cgi
-t/Plack-Middleware/cgi-bin/hello3.cgi
-t/Plack-Middleware/cgi-bin/utf8.cgi
-t/Plack-Middleware/cgibin.t
-t/Plack-Middleware/cgibin_exec.t
-t/Plack-Middleware/chunked.t
-t/Plack-Middleware/component-leak.t
-t/Plack-Middleware/component.t
-t/Plack-Middleware/conditional.t
-t/Plack-Middleware/conditional_new.t
-t/Plack-Middleware/conditionalget.t
-t/Plack-Middleware/conditionalget_writer.t
-t/Plack-Middleware/content_length.t
-t/Plack-Middleware/directory.t
-t/Plack-Middleware/error_document.t
-t/Plack-Middleware/error_document_streaming_app.t
-t/Plack-Middleware/errors/404.html
-t/Plack-Middleware/errors/500.html
-t/Plack-Middleware/file.t
-t/Plack-Middleware/head.t
-t/Plack-Middleware/head_streaming.t
-t/Plack-Middleware/htpasswd
-t/Plack-Middleware/httpexceptions.t
-t/Plack-Middleware/httpexceptions_streaming.t
-t/Plack-Middleware/iis6_script_name_fix.t
-t/Plack-Middleware/iis7_keep_alive_fix.t
-t/Plack-Middleware/jsonp.t
-t/Plack-Middleware/lint.t
-t/Plack-Middleware/lint_env.t
-t/Plack-Middleware/lint_utf8_false_alarm.t
-t/Plack-Middleware/log4perl.t
-t/Plack-Middleware/log_dispatch.t
-t/Plack-Middleware/order.t
-t/Plack-Middleware/prefix.t
-t/Plack-Middleware/psgibin.t
-t/Plack-Middleware/rearrange_headers.t
-t/Plack-Middleware/recursive/base.t
-t/Plack-Middleware/recursive/streaming.t
-t/Plack-Middleware/recursive/throw.t
-t/Plack-Middleware/recursive/throw_streaming.t
-t/Plack-Middleware/refresh-init.t
-t/Plack-Middleware/runtime.t
-t/Plack-Middleware/simple_content_filter.t
-t/Plack-Middleware/simple_logger.t
-t/Plack-Middleware/stacktrace/basic.t
-t/Plack-Middleware/stacktrace/force.t
-t/Plack-Middleware/stacktrace/sigdie.t
-t/Plack-Middleware/stacktrace/streaming.t
-t/Plack-Middleware/stacktrace/utf8.t
-t/Plack-Middleware/static.foo
-t/Plack-Middleware/static.t
-t/Plack-Middleware/static.txt
-t/Plack-Middleware/static_env.t
-t/Plack-Middleware/urlmap.t
-t/Plack-Middleware/urlmap_builder.t
-t/Plack-Middleware/urlmap_env.t
-t/Plack-Middleware/urlmap_ports.t
-t/Plack-Middleware/wrapcgi.t
-t/Plack-Middleware/wrapcgi_exec.t
-t/Plack-Middleware/xframework.t
-t/Plack-Middleware/xsendfile.t
-t/Plack-MIME/add_type.t
-t/Plack-MIME/basic.t
-t/Plack-MIME/fallback.t
-t/Plack-Request/base.t
-t/Plack-Request/body.t
-t/Plack-Request/content-on-get.t
-t/Plack-Request/content.t
-t/Plack-Request/cookie.t
-t/Plack-Request/double_port.t
-t/Plack-Request/foo1.txt
-t/Plack-Request/foo2.txt
-t/Plack-Request/hostname.t
-t/Plack-Request/many_upload.t
-t/Plack-Request/multi_read.t
-t/Plack-Request/new.t
-t/Plack-Request/parameters.t
-t/Plack-Request/params.t
-t/Plack-Request/path_info.t
-t/Plack-Request/path_info_escaped.t
-t/Plack-Request/readbody.t
-t/Plack-Request/request_uri.t
-t/Plack-Request/upload-basename.t
-t/Plack-Request/upload-large.t
-t/Plack-Request/upload.t
-t/Plack-Request/uri.t
-t/Plack-Request/uri_utf8.t
-t/Plack-Response/body.t
-t/Plack-Response/compatible.t
-t/Plack-Response/cookie.t
-t/Plack-Response/new.t
-t/Plack-Response/redirect.t
-t/Plack-Response/response.t
-t/Plack-Runner/options.t
-t/Plack-Runner/path.t
-t/Plack-TempBuffer/print.t
-t/Plack-Test/2args.t
-t/Plack-Test/cookie.t
-t/Plack-Test/hello.t
-t/Plack-Test/hello_server.t
-t/Plack-Test/suite.t
-t/Plack-Util/bad.psgi
-t/Plack-Util/bad2.psgi
-t/Plack-Util/bin/findbin.psgi
-t/Plack-Util/error.psgi
-t/Plack-Util/foreach.t
-t/Plack-Util/headers.t
-t/Plack-Util/headers_obj.t
-t/Plack-Util/Hello.pm
-t/Plack-Util/hello.psgi
-t/Plack-Util/inc/hello.psgi
-t/Plack-Util/inline_object.t
-t/Plack-Util/io_with_path.t
-t/Plack-Util/is_real_fh.t
-t/Plack-Util/load.t
-t/Plack-Util/response_cb.t
-xt/perlcriticrc
-xt/pod.t
-xt/podspell.t
View
23 MANIFEST.SKIP
@@ -1,23 +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
-nytprof/
-MYMETA
-\.proverc
View
91 META.json
@@ -0,0 +1,91 @@
+{
+ "abstract" : "Perl Superglue for Web frameworks and Web Servers (PSGI toolkit)",
+ "author" : [
+ "Tatsuhiko Miyagawa <miyagawa@bulknews.net>"
+ ],
+ "dynamic_config" : 0,
+ "generated_by" : "Dist::Milla version v0.9.3, Dist::Zilla version 4.300032, CPAN::Meta::Converter version 2.130880",
+ "license" : [
+ "perl_5"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : "2"
+ },
+ "name" : "Plack",
+ "no_index" : {
+ "directory" : [
+ "t",
+ "xt",
+ "inc",
+ "share",
+ "eg",
+ "examples"
+ ]
+ },
+ "prereqs" : {
+ "configure" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "6.30",
+ "File::ShareDir::Install" : "0.03"
+ }
+ },
+ "develop" : {
+ "recommends" : {
+ "Authen::Simple::Passwd" : "0",
+ "CGI::Compile" : "0",
+ "CGI::Emulate::PSGI" : "0",
+ "FCGI" : "0",
+ "FCGI::ProcManager" : "0",
+ "HTTP::Request::AsCGI" : "0",
+ "HTTP::Server::Simple::PSGI" : "0",
+ "IO::Handle::Util" : "0",
+ "LWP::Protocol::http10" : "0",
+ "Log::Log4perl" : "0",
+ "MIME::Types" : "0"
+ },
+ "requires" : {
+ "Test::Pod" : "1.41"
+ }
+ },
+ "runtime" : {
+ "requires" : {
+ "Devel::StackTrace" : "1.23",
+ "Devel::StackTrace::AsHTML" : "0.11",
+ "File::ShareDir" : "1.00",
+ "Filesys::Notify::Simple" : "0",
+ "HTTP::Body" : "1.06",
+ "HTTP::Message" : "5.814",
+ "Hash::MultiValue" : "0.05",
+ "LWP::UserAgent" : "5.814",
+ "Pod::Usage" : "1.36",
+ "Stream::Buffered" : "0.02",
+ "Test::TCP" : "1.02",
+ "Try::Tiny" : "0",
+ "URI" : "1.59",
+ "parent" : "0",
+ "perl" : "5.008001"
+ }
+ },
+ "test" : {
+ "requires" : {
+ "Test::More" : "0.88",
+ "Test::Requires" : "0"
+ }
+ }
+ },
+ "release_status" : "stable",
+ "resources" : {
+ "bugtracker" : {
+ "web" : "https://github.com/plack/Plack/issues"
+ },
+ "homepage" : "https://github.com/plack/Plack",
+ "repository" : {
+ "type" : "git",
+ "url" : "https://github.com/plack/Plack.git",
+ "web" : "https://github.com/plack/Plack"
+ }
+ },
+ "version" : "1.0018"
+}
+
View
141 Makefile.PL
@@ -1,56 +1,91 @@
-# See and run ./script/bootstrap when you get errors running Makefile.PL
-use inc::Module::Install;
-name 'Plack';
-all_from 'lib/Plack.pm';
-readme_from 'lib/Plack.pm';
-authority 'MIYAGAWA';
+use strict;
+use warnings;
+
+use 5.008001;
+
+use ExtUtils::MakeMaker 6.30;
+
+use File::ShareDir::Install;
+install_share dist => "share";
+
+
+my %WriteMakefileArgs = (
+ "ABSTRACT" => "Perl Superglue for Web frameworks and Web Servers (PSGI toolkit)",
+ "AUTHOR" => "Tatsuhiko Miyagawa <miyagawa\@bulknews.net>",
+ "BUILD_REQUIRES" => {},
+ "CONFIGURE_REQUIRES" => {
+ "ExtUtils::MakeMaker" => "6.30",
+ "File::ShareDir::Install" => "0.03"
+ },
+ "DISTNAME" => "Plack",
+ "EXE_FILES" => [
+ "script/plackup"
+ ],
+ "LICENSE" => "perl",
+ "NAME" => "Plack",
+ "PREREQ_PM" => {
+ "Devel::StackTrace" => "1.23",
+ "Devel::StackTrace::AsHTML" => "0.11",
+ "File::ShareDir" => "1.00",
+ "Filesys::Notify::Simple" => 0,
+ "HTTP::Body" => "1.06",
+ "HTTP::Message" => "5.814",
+ "Hash::MultiValue" => "0.05",
+ "LWP::UserAgent" => "5.814",
+ "Pod::Usage" => "1.36",
+ "Stream::Buffered" => "0.02",
+ "Test::TCP" => "1.02",
+ "Try::Tiny" => 0,
+ "URI" => "1.59",
+ "parent" => 0
+ },
+ "TEST_REQUIRES" => {
+ "Test::More" => "0.88",
+ "Test::Requires" => 0
+ },
+ "VERSION" => "1.0018",
+ "test" => {
+ "TESTS" => "t/*.t t/HTTP-Message-PSGI/*.t t/HTTP-Server-PSGI/*.t t/Plack-Builder/*.t t/Plack-HTTPParser-PP/*.t t/Plack-Handler/*.t t/Plack-Loader/*.t t/Plack-MIME/*.t t/Plack-Middleware/*.t t/Plack-Middleware/cascade/*.t t/Plack-Middleware/recursive/*.t t/Plack-Middleware/stacktrace/*.t t/Plack-Request/*.t t/Plack-Response/*.t t/Plack-Runner/*.t t/Plack-TempBuffer/*.t t/Plack-Test/*.t t/Plack-Util/*.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);
+
+{
+package
+MY;
+use File::ShareDir::Install qw(postamble);
+}
-requires 'LWP::UserAgent', 5.814; # Plack::Test
-requires 'HTTP::Message', 5.814;
-requires 'URI', 1.59;
-requires 'Pod::Usage', 1.36; # plackup
-requires 'File::ShareDir', '1.00'; # Plack::Test::Suite
-requires 'Try::Tiny';
-requires 'parent';
-requires 'Stream::Buffered', '0.02';
-requires 'Devel::StackTrace', 1.23; # Middleware::StackTrace
-requires 'Devel::StackTrace::AsHTML', 0.11; # Middleware::StackTrace
-
-requires 'Filesys::Notify::Simple'; # plackup -r
-
-requires 'Hash::MultiValue', 0.05; # Plack::Request
-requires 'HTTP::Body', 1.06; # Plack::Request
-requires 'Test::TCP', 1.02; # Plack::Test needs to be installed
-
-build_requires 'Test::More', 0.88;
-test_requires 'Test::Requires';
-
-tests 't/*.t t/*/*.t';
-author_tests 'xt';
-
-install_share 'share';
-install_script 'bin/plackup';
-
-auto_set_repository;
-
-resources
- homepage => "http://plackperl.org",
- bugtracker => "https://github.com/plack/Plack/issues";
-
-WriteAll;
-
-warn <<RECOMMENDS;
-
- This is Plack, PSGI toolkit containing servers, middleware and utils.
-
- To run the default backends faster with XS extensions, as well as run some server
- backends like Prefork and FCGI, you need to install additional Perl module dependencies,
- that are included in Task::Plack bundle. You're recommended to run
-
- cpan> install Task::Plack
-
- once this distribution is installed. Enjoy!
-
-RECOMMENDS
View
192 README
@@ -1,192 +0,0 @@
-NAME
- Plack - Perl Superglue for Web frameworks and Web Servers (PSGI toolkit)
-
-DESCRIPTION
- Plack is a set of tools for using the PSGI stack. It contains middleware
- components, a reference server and utilities for Web application
- frameworks. Plack is like Ruby's Rack or Python's Paste for WSGI.
-
- See PSGI for the PSGI specification and PSGI::FAQ to know what PSGI and
- Plack are and why we need them.
-
-MODULES AND UTILITIES
- Plack::Handler
- Plack::Handler and its subclasses contains adapters for web servers. We
- have adapters for the built-in standalone web server HTTP::Server::PSGI,
- CGI, FCGI, Apache1, Apache2 and HTTP::Server::Simple included in the
- core Plack distribution.
-
- There are also many HTTP server implementations on CPAN that have Plack
- handlers.
-
- See Plack::Handler when writing your own adapters.
-
- Plack::Loader
- Plack::Loader is a loader to load one Plack::Handler adapter and run a
- PSGI application code reference with it.
-
- Plack::Util
- Plack::Util contains a lot of utility functions for server implementors
- as well as middleware authors.
-
- .psgi files
- A PSGI application is a code reference but it's not easy to pass code
- reference via the command line or configuration files, so Plack uses a
- convention that you need a file named "app.psgi" or similar, which would
- be loaded (via perl's core function "do") to return the PSGI application
- code reference.
-
- # Hello.psgi
- my $app = sub {
- my $env = shift;
- # ...
- return [ $status, $headers, $body ];
- };
-
- If you use a web framework, chances are that they provide a helper
- utility to automatically generate these ".psgi" files for you, such as:
-
- # MyApp.psgi
- use MyApp;
- my $app = sub { MyApp->run_psgi(@_) };
-
- It's important that the return value of ".psgi" file is the code
- reference. See "eg/dot-psgi" directory for more examples of ".psgi"
- files.
-
- plackup, Plack::Runner
- plackup is a command line launcher to run PSGI applications from command
- line using Plack::Loader to load PSGI backends. It can be used to run
- standalone servers and FastCGI daemon processes. Other server backends
- like Apache2 needs a separate configuration but ".psgi" application file
- can still be the same.
-
- If you want to write your own frontend that replaces, or adds
- functionalities to plackup, take a look at the Plack::Runner module.
-
- Plack::Middleware
- PSGI middleware is a PSGI application that wraps an existing PSGI
- application and plays both side of application and servers. From the
- servers the wrapped code reference still looks like and behaves exactly
- the same as PSGI applications.
-
- Plack::Middleware gives you an easy way to wrap PSGI applications with a
- clean API, and compatibility with Plack::Builder DSL.
-
- Plack::Builder
- Plack::Builder gives you a DSL that you can enable Middleware in ".psgi"
- files to wrap existent PSGI applications.
-
- Plack::Request, Plack::Response
- Plack::Request gives you a nice wrapper API around PSGI $env hash to get
- headers, cookies and query parameters much like Apache::Request in
- mod_perl.
-
- Plack::Response does the same to construct the response array reference.
-
- Plack::Test
- Plack::Test is a unified interface to test your PSGI application using
- standard HTTP::Request and HTTP::Response pair with simple callbacks.
-
- Plack::Test::Suite
- Plack::Test::Suite is a test suite to test a new PSGI server backend.
-
-CONTRIBUTING
- Patches and Bug Fixes
- Small patches and bug fixes can be either submitted via nopaste on IRC
- <irc://irc.perl.org/#plack> or the github issue tracker
- <http://github.com/plack/Plack/issues>. Forking on github
- <http://github.com/plack/Plack> is another good way if you intend to
- make larger fixes.
-
- See also <http://contributing.appspot.com/plack> when you think this
- document is terribly outdated.
-
- Module Namespaces
- Modules added to the Plack:: sub-namespaces should be reasonably generic
- components which are useful as building blocks and not just simply using
- Plack.
-
- Middleware authors are free to use the Plack::Middleware:: namespace for
- their middleware components. Middleware must be written in the pipeline
- style such that they can chained together with other middleware
- components. The Plack::Middleware:: modules in the core distribution are
- good examples of such modules. It is recommended that you inherit from
- Plack::Middleware for these types of modules.
-
- Not all middleware components are wrappers, but instead are more like
- endpoints in a middleware chain. These types of components should use
- the Plack::App:: namespace. Again, look in the core modules to see
- excellent examples of these (Plack::App::File, Plack::App::Directory,
- etc.). It is recommended that you inherit from Plack::Component for
- these types of modules.
-
- DO NOT USE Plack:: namespace to build a new web application or a
- framework. It's like naming your application under CGI:: namespace if
- it's supposed to run on CGI and that is a really bad choice and would
- confuse people badly.
-
-AUTHOR
- Tatsuhiko Miyagawa
-
-COPYRIGHT
- The following copyright notice applies to all the files provided in this
- distribution, including binary files, unless explicitly noted otherwise.
-
- Copyright 2009-2011 Tatsuhiko Miyagawa
-
-CORE DEVELOPERS
- Tatsuhiko Miyagawa (miyagawa)
-
- Tokuhiro Matsuno (tokuhirom)
-
- Jesse Luehrs (doy)
-
- Tomas Doran (bobtfish)
-
- Graham Knop (haarg)
-
-CONTRIBUTORS
- Yuval Kogman (nothingmuch)
-
- Kazuhiro Osawa (Yappo)
-
- Kazuho Oku
-
- Florian Ragwitz (rafl)
-
- Chia-liang Kao (clkao)
-
- Masahiro Honma (hiratara)
-
- Daisuke Murase (typester)
-
- John Beppu
-
- Matt S Trout (mst)
-
- Shawn M Moore (Sartak)
-
- Stevan Little
-
- Hans Dieter Pearcey (confound)
-
- mala
-
- Mark Stosberg
-
- Aaron Trevena
-
-SEE ALSO
- The PSGI specification upon which Plack is based.
-
- <http://plackperl.org/>
-
- The Plack wiki: <https://github.com/plack/Plack/wiki>
-
- The Plack FAQ: <https://github.com/plack/Plack/wiki/Faq>
-
-LICENSE
- This library is free software; you can redistribute it and/or modify it
- under the same terms as Perl itself.
-
View
220 README.md
@@ -0,0 +1,220 @@
+# NAME
+
+Plack - Perl Superglue for Web frameworks and Web Servers (PSGI toolkit)
+
+# DESCRIPTION
+
+Plack is a set of tools for using the PSGI stack. It contains
+middleware components, a reference server and utilities for Web
+application frameworks. Plack is like Ruby's Rack or Python's Paste
+for WSGI.
+
+See [PSGI](http://search.cpan.org/perldoc?PSGI) for the PSGI specification and [PSGI::FAQ](http://search.cpan.org/perldoc?PSGI::FAQ) to know what
+PSGI and Plack are and why we need them.
+
+# MODULES AND UTILITIES
+
+## Plack::Handler
+
+[Plack::Handler](http://search.cpan.org/perldoc?Plack::Handler) and its subclasses contains adapters for web
+servers. We have adapters for the built-in standalone web server
+[HTTP::Server::PSGI](http://search.cpan.org/perldoc?HTTP::Server::PSGI), [CGI](http://search.cpan.org/perldoc?Plack::Handler::CGI),
+[FCGI](http://search.cpan.org/perldoc?Plack::Handler::FCGI), [Apache1](http://search.cpan.org/perldoc?Plack::Handler::Apache1),
+[Apache2](http://search.cpan.org/perldoc?Plack::Handler::Apache2) and
+[HTTP::Server::Simple](http://search.cpan.org/perldoc?Plack::Handler::HTTP::Server::Simple) included
+in the core Plack distribution.
+
+There are also many HTTP server implementations on CPAN that have Plack
+handlers.
+
+See [Plack::Handler](http://search.cpan.org/perldoc?Plack::Handler) when writing your own adapters.
+
+## Plack::Loader
+
+[Plack::Loader](http://search.cpan.org/perldoc?Plack::Loader) is a loader to load one [Plack::Handler](http://search.cpan.org/perldoc?Plack::Handler) adapter
+and run a PSGI application code reference with it.
+
+## Plack::Util
+
+[Plack::Util](http://search.cpan.org/perldoc?Plack::Util) contains a lot of utility functions for server
+implementors as well as middleware authors.
+
+## .psgi files
+
+A PSGI application is a code reference but it's not easy to pass code
+reference via the command line or configuration files, so Plack uses a
+convention that you need a file named `app.psgi` or similar, which
+would be loaded (via perl's core function `do`) to return the PSGI
+application code reference.
+
+ # Hello.psgi
+ my $app = sub {
+ my $env = shift;
+ # ...
+ return [ $status, $headers, $body ];
+ };
+
+If you use a web framework, chances are that they provide a helper
+utility to automatically generate these `.psgi` files for you, such
+as:
+
+ # MyApp.psgi
+ use MyApp;
+ my $app = sub { MyApp->run_psgi(@_) };
+
+It's important that the return value of `.psgi` file is the code
+reference. See `eg/dot-psgi` directory for more examples of `.psgi`
+files.
+
+## plackup, Plack::Runner
+
+[plackup](http://search.cpan.org/perldoc?plackup) is a command line launcher to run PSGI applications from
+command line using [Plack::Loader](http://search.cpan.org/perldoc?Plack::Loader) to load PSGI backends. It can be
+used to run standalone servers and FastCGI daemon processes. Other
+server backends like Apache2 needs a separate configuration but
+`.psgi` application file can still be the same.
+
+If you want to write your own frontend that replaces, or adds
+functionalities to [plackup](http://search.cpan.org/perldoc?plackup), take a look at the [Plack::Runner](http://search.cpan.org/perldoc?Plack::Runner) module.
+
+## Plack::Middleware
+
+PSGI middleware is a PSGI application that wraps an existing PSGI
+application and plays both side of application and servers. From the
+servers the wrapped code reference still looks like and behaves
+exactly the same as PSGI applications.
+
+[Plack::Middleware](http://search.cpan.org/perldoc?Plack::Middleware) gives you an easy way to wrap PSGI applications
+with a clean API, and compatibility with [Plack::Builder](http://search.cpan.org/perldoc?Plack::Builder) DSL.
+
+## Plack::Builder
+
+[Plack::Builder](http://search.cpan.org/perldoc?Plack::Builder) gives you a DSL that you can enable Middleware in
+`.psgi` files to wrap existent PSGI applications.
+
+## Plack::Request, Plack::Response
+
+[Plack::Request](http://search.cpan.org/perldoc?Plack::Request) gives you a nice wrapper API around PSGI `$env`
+hash to get headers, cookies and query parameters much like
+[Apache::Request](http://search.cpan.org/perldoc?Apache::Request) in mod\_perl.
+
+[Plack::Response](http://search.cpan.org/perldoc?Plack::Response) does the same to construct the response array
+reference.
+
+## Plack::Test
+
+[Plack::Test](http://search.cpan.org/perldoc?Plack::Test) is a unified interface to test your PSGI application
+using standard [HTTP::Request](http://search.cpan.org/perldoc?HTTP::Request) and [HTTP::Response](http://search.cpan.org/perldoc?HTTP::Response) pair with simple
+callbacks.
+
+## Plack::Test::Suite
+
+[Plack::Test::Suite](http://search.cpan.org/perldoc?Plack::Test::Suite) is a test suite to test a new PSGI server backend.
+
+# CONTRIBUTING
+
+## Patches and Bug Fixes
+
+Small patches and bug fixes can be either submitted via nopaste on IRC
+[irc://irc.perl.org/\#plack](irc://irc.perl.org/\#plack) or [the github issue tracker](http://github.com/plack/Plack/issues). Forking on
+[github](http://github.com/plack/Plack) is another good way if you
+intend to make larger fixes.
+
+See also [http://contributing.appspot.com/plack](http://contributing.appspot.com/plack) when you think this
+document is terribly outdated.
+
+## Module Namespaces
+
+Modules added to the Plack:: sub-namespaces should be reasonably generic
+components which are useful as building blocks and not just simply using
+Plack.
+
+Middleware authors are free to use the Plack::Middleware:: namespace for
+their middleware components. Middleware must be written in the pipeline
+style such that they can chained together with other middleware components.
+The Plack::Middleware:: modules in the core distribution are good examples
+of such modules. It is recommended that you inherit from [Plack::Middleware](http://search.cpan.org/perldoc?Plack::Middleware)
+for these types of modules.
+
+Not all middleware components are wrappers, but instead are more like
+endpoints in a middleware chain. These types of components should use the
+Plack::App:: namespace. Again, look in the core modules to see excellent
+examples of these ([Plack::App::File](http://search.cpan.org/perldoc?Plack::App::File), [Plack::App::Directory](http://search.cpan.org/perldoc?Plack::App::Directory), etc.).
+It is recommended that you inherit from [Plack::Component](http://search.cpan.org/perldoc?Plack::Component) for these
+types of modules.
+
+__DO NOT USE__ Plack:: namespace to build a new web application or a
+framework. It's like naming your application under CGI:: namespace if
+it's supposed to run on CGI and that is a really bad choice and
+would confuse people badly.
+
+# AUTHOR
+
+Tatsuhiko Miyagawa
+
+# COPYRIGHT
+
+The following copyright notice applies to all the files provided in
+this distribution, including binary files, unless explicitly noted
+otherwise.
+
+Copyright 2009-2011 Tatsuhiko Miyagawa
+
+# CORE DEVELOPERS
+
+Tatsuhiko Miyagawa (miyagawa)
+
+Tokuhiro Matsuno (tokuhirom)
+
+Jesse Luehrs (doy)
+
+Tomas Doran (bobtfish)
+
+Graham Knop (haarg)
+
+# CONTRIBUTORS
+
+Yuval Kogman (nothingmuch)
+
+Kazuhiro Osawa (Yappo)
+
+Kazuho Oku
+
+Florian Ragwitz (rafl)
+
+Chia-liang Kao (clkao)
+
+Masahiro Honma (hiratara)
+
+Daisuke Murase (typester)
+
+John Beppu
+
+Matt S Trout (mst)
+
+Shawn M Moore (Sartak)
+
+Stevan Little
+
+Hans Dieter Pearcey (confound)
+
+mala
+
+Mark Stosberg
+
+Aaron Trevena
+
+# SEE ALSO
+
+The [PSGI](http://search.cpan.org/perldoc?PSGI) specification upon which Plack is based.
+
+[http://plackperl.org/](http://plackperl.org/)
+
+The Plack wiki: [https://github.com/plack/Plack/wiki](https://github.com/plack/Plack/wiki)
+
+The Plack FAQ: [https://github.com/plack/Plack/wiki/Faq](https://github.com/plack/Plack/wiki/Faq)
+
+# LICENSE
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
View
35 cpanfile
@@ -0,0 +1,35 @@
+requires 'perl', '5.008001';
+
+requires 'Devel::StackTrace', '1.23';
+requires 'Devel::StackTrace::AsHTML', '0.11';
+requires 'File::ShareDir', '1.00';
+requires 'Filesys::Notify::Simple';
+requires 'HTTP::Body', '1.06';
+requires 'HTTP::Message', '5.814';
+requires 'Hash::MultiValue', '0.05';
+requires 'LWP::UserAgent', '5.814';
+requires 'Pod::Usage', '1.36';
+requires 'Stream::Buffered', '0.02';
+requires 'Test::TCP', '1.02';
+requires 'Try::Tiny';
+requires 'URI', '1.59';
+requires 'parent';
+
+on test => sub {
+ requires 'Test::More', '0.88';
+ requires 'Test::Requires';
+};
+
+on develop => sub {
+ recommends 'FCGI';
+ recommends 'FCGI::ProcManager';
+ recommends 'MIME::Types';
+ recommends 'Authen::Simple::Passwd';
+ recommends 'CGI::Emulate::PSGI';
+ recommends 'CGI::Compile';
+ recommends 'IO::Handle::Util';
+ recommends 'LWP::Protocol::http10';
+ recommends 'Log::Log4perl';
+ recommends 'HTTP::Server::Simple::PSGI';
+ recommends 'HTTP::Request::AsCGI';
+};
View
3  dist.ini
@@ -0,0 +1,3 @@
+[@Milla]
+installer = MakeMaker
+Test::Compile.skip = Apache
View
46 script/bootstrap
@@ -1,46 +0,0 @@
-#!/usr/bin/perl
-# boostrap development environment
-use strict;
-
-sub diag {
- warn "------> $_[0]\n";
-}
-
-if (`cpanm --version` !~ /cpanminus/) {
- die "cpanm: not found. Install it first with: curl -L cpanmin.us | perl - App::cpanminus\n";
-}
-
-diag "Installing Module::Install and plugins";
-system "cpanm", qw(
- Module::Install
- Module::Install::AuthorTests
- Module::Install::ReadmeFromPod
- Module::Install::Repository
- Module::Install::Authority
-);
-
-diag "Installing dependencies";
-system "cpanm", "--installdeps", ".";
-
-# FIXME should go to cpanfile/devel_requires or Plack::Devel bundle
-diag "Installing devel devependencies";
-system "cpanm", qw(
- FCGI
- FCGI::ProcManager
- MIME::Types
- Authen::Simple::Passwd
- CGI::Emulate::PSGI
- CGI::Compile
- IO::Handle::Util
- LWP::Protocol::http10
- Log::Log4perl
- HTTP::Server::Simple::PSGI
- HTTP::Request::AsCGI
-);
-
-diag "Running tests";
-system "prove", "-lr", "t";
-
-warn "\nYour development environment is set up. Happy hacking!\n";
-
-
View
0  bin/plackup → script/plackup
File renamed without changes
View
4 t/00_compile.t
@@ -1,4 +0,0 @@
-use strict;
-use Test::More tests => 1;
-
-BEGIN { use_ok 'Plack' }
View
8 t/Plack-Middleware/file.t
@@ -4,7 +4,7 @@ use Test::More;
use HTTP::Request::Common;
use Plack::App::File;
-my $app = Plack::App::File->new(file => 'README');
+my $app = Plack::App::File->new(file => 'Changes');
test_psgi $app, sub {
my $cb = shift;
@@ -19,8 +19,8 @@ test_psgi $app, sub {
};
my $app_content_type = Plack::App::File->new(
- file => 'README',
- content_type => 'text/x-readme'
+ file => 'Changes',
+ content_type => 'text/x-changes'
);
test_psgi $app_content_type, sub {
@@ -31,7 +31,7 @@ test_psgi $app_content_type, sub {
like $res->content, qr/Plack/;
$res = $cb->(GET "/whatever");
- is $res->content_type, 'text/x-readme';
+ is $res->content_type, 'text/x-changes';
is $res->code, 200;
};
View
8 t/Plack-Middleware/static.t
@@ -36,13 +36,13 @@ my %test = (
my $cb = shift;
{
- my $path = "t/00_compile.t";
+ my $path = "t/test.txt";
my $res = $cb->(GET "http://localhost/$path");
- is $res->content_type, 'text/troff', 'ok case';
- like $res->content, qr/use Test::More/;
+ is $res->content_type, 'text/plain', 'ok case';
+ like $res->content, qr/foo/;
is -s $path, length($res->content);
my $content = do { open my $fh, "<", $path; binmode $fh; join '', <$fh> };
- is $content,$res->content;
+ is $content, $res->content;
}
{
View
4 t/Plack-Middleware/static_env.t
@@ -21,8 +21,8 @@ $app = Plack::Middleware::AccessLog->wrap($app, logger => sub { $line = shift })
test_psgi app => $app, client => sub {
my $cb = shift;
- my $res = $cb->(GET "http://localhost/t/00_compile.t", Authorization => "Basic YWRtaW46czNjcjN0");
- like $res->content, qr/use Test/;
+ my $res = $cb->(GET "http://localhost/t/test.txt", Authorization => "Basic YWRtaW46czNjcjN0");
+ like $res->content, qr/foo/;
like $line, qr/ admin /;
};
View
6 t/Plack-Middleware/xsendfile.t
@@ -21,10 +21,10 @@ test_psgi app => $handler, client => sub {
my $cb = shift;
{
- my $req = GET "http://localhost/t/00_compile.t", 'X-Sendfile-Type' => 'X-Sendfile';
+ my $req = GET "http://localhost/t/test.txt", 'X-Sendfile-Type' => 'X-Sendfile';
my $res = $cb->($req);
- is $res->content_type, 'text/troff';;
- is_wo_case $res->header('X-Sendfile'), Cwd::realpath("t/00_compile.t"); # wo_case for Win32--
+ is $res->content_type, 'text/plain';;
+ is_wo_case $res->header('X-Sendfile'), Cwd::realpath("t/test.txt"); # wo_case for Win32--
is $res->content, '';
}
};
View
2  t/Plack-Runner/path.t
@@ -23,7 +23,7 @@ my $port = empty_port();
my $pid = fork;
if ($pid == 0) {
close STDERR;
- exec($^X, '-Ilib', 'bin/plackup', '-p', $port, '--path', '/app/', '-a', $psgi_file) or die $@;
+ exec($^X, '-Ilib', 'script/plackup', '-p', $port, '--path', '/app/', '-a', $psgi_file) or die $@;
} else {
$SIG{INT} = 'IGNORE';
sleep 1;
View
9 t/Plack-Util/io_with_path.t
@@ -1,13 +1,12 @@
use Test::More;
use Plack::Util;
-open my $fh, "<", "t/00_compile.t";
-Plack::Util::set_io_path($fh, "/path/to/00_compile.t");
+open my $fh, "<", "t/test.txt";
+Plack::Util::set_io_path($fh, "/path/to/test.txt");
-is $fh->path, "/path/to/00_compile.t";
+is $fh->path, "/path/to/test.txt";
-like scalar <$fh>, qr/use strict/;
-like $fh->getline, qr/use Test::More/;
+like scalar <$fh>, qr/foo/;
ok fileno $fh;
isa_ok $fh, 'IO::Handle';
View
1  t/test.txt
@@ -0,0 +1 @@
+foo
View
7 xt/perlcriticrc
@@ -1,7 +0,0 @@
-[TestingAndDebugging::ProhibitNoStrict]
-allow=refs
-
-[-Subroutines::ProhibitSubroutinePrototypes]
-
-[BuiltinFunctions::ProhibitStringyEval]
-allow_includes=1
View
4 xt/pod.t
@@ -1,4 +0,0 @@
-use Test::More;
-eval "use Test::Pod 1.00";
-plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
-all_pod_files_ok();
View
79 xt/podspell.t
@@ -1,79 +0,0 @@
-use Test::More;
-eval q{ use Test::Spelling };
-plan skip_all => "Test::Spelling is not installed." if $@;
-add_stopwords(map { split /[\s\:\-]+/ } <DATA>);
-$ENV{LANG} = 'C';
-set_spell_cmd("aspell -l en list") if `which aspell`;
-all_pod_files_spelling_ok('lib');
-
-__DATA__
-AIO
-API
-AnyEvent
-CGI
-CPAN
-Cascadable
-Coro
-DSL
-FCGI
-FastCGI
-HTTP
-HUP
-IP
-IRC
-Kazuhiro Osawa
-Kazuho Oku
-Kogman
-Middlewares
-MockHTTP
-Mojo
-Mojo's
-Namespaces
-OO
-Oku's
-PSGI
-Perlbal
-Plack
-ReverseHTTP
-ServerSimple
-Tatsuhiko Miyagawa
-Tokuhiro Matsuno
-URI
-URLMap
-XS
-Yuval
-app
-backend
-callback
-cgi
-coroutine
-env
-fallback
-filename
-github
-hookout
-hostname
-hostnames
-http
-https
-implementors
-internet
-middleware
-middlewares
-multithread
-namespace
-namespaces
-natively
-nopaste
-param
-plackup
-pm
-prefork
-psgi
-rackup
-referer
-reversehttp
-standalone
-stringifies
-uri
-var
Please sign in to comment.
Something went wrong with that request. Please try again.