From cbbeb0ecc5b1224743848ac773860a49009c4fbd Mon Sep 17 00:00:00 2001 From: franck cuny Date: Thu, 3 Jun 2010 14:52:53 +0200 Subject: swith to dist::zilla --- .gitignore | 1 + Makefile.PL | 18 ------------------ README | 36 ------------------------------------ dist.ini | 28 ++++++++++++++++++++++++++++ lib/Dancer/Logger/PSGI.pm | 23 +++-------------------- t/01_basic.t | 10 +++++----- 6 files changed, 37 insertions(+), 79 deletions(-) delete mode 100644 Makefile.PL delete mode 100644 README create mode 100644 dist.ini diff --git a/.gitignore b/.gitignore index c38068c..31b003f 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ Makefile.old nytprof.out MANIFEST.bak *.sw[po] +t/logs/ diff --git a/Makefile.PL b/Makefile.PL deleted file mode 100644 index df00b28..0000000 --- a/Makefile.PL +++ /dev/null @@ -1,18 +0,0 @@ -use inc::Module::Install; -name 'Dancer-Logger-PSGI'; -all_from 'lib/Dancer/Logger/PSGI.pm'; -readme_from 'lib/Dancer/Logger/PSGI.pm'; - -requires 'Plack'; -requires 'Plack::Middleware::ConsoleLogger'; -requires 'Test::TCP'; - -tests 't/*.t'; - -build_requires 'Test::More'; -use_test_base; -auto_include; -#auto_include_deps; -author_tests 'xt'; -auto_set_repository; -WriteAll; diff --git a/README b/README deleted file mode 100644 index 52cd616..0000000 --- a/README +++ /dev/null @@ -1,36 +0,0 @@ -NAME - Dancer::Logger::PSGI - PSGI logger handler for Dancer - -SYNOPSIS - In your Dancer's configuration file: - - logger: PSGI - - In your application - - warning "this is a warning" - - In your app.psgi - - $app = builder { enable "ConsoleLogger"; $app; } - - With Plack::Middleware::ConsoleLogger, all your log will be send to the - javascript console of your browser. - -DESCRIPTION - This class is an interface between your Dancer's application and - psgix.logger. Message will be logged in whatever logger you decided to - use in your Plack handler. If no logger is defined, nothing will be - logged. - -AUTHOR - franck cuny - -SEE ALSO - Plack::Middleware::ConsoleLogger, Plack::Middleware::NullLogger, - Plack::Middleware::Log4perl. - -LICENSE - This library is free software; you can redistribute it and/or modify it - under the same terms as Perl itself. - diff --git a/dist.ini b/dist.ini new file mode 100644 index 0000000..2d8423c --- /dev/null +++ b/dist.ini @@ -0,0 +1,28 @@ +name = Dancer-Logger-PSGI +author = franck cuny +license = Perl_5 +copyright_holder = franck cuny +copyright_year = 2010 +version = 0.01 + +[@Filter] +bundle = @Basic + +[MetaConfig] +[MetaJSON] +[PkgVersion] +[PodSyntaxTests] +[PodCoverageTests] +[NoTabsTests] +[EOLTests] + +[MetaResources] +repository = git://github.com/franckcuny/dancer-logger-psgi.git +bugtracker = http://rt.cpan.org/Public/Dist/Display.html?Name=Dancer::Logger::PSGI +homepage = http://search.cpan.org/perldoc?Dancer::Logger::PSGI + +[PodWeaver] +[AutoPrereq] +[ReadmeFromPod] +[CheckChangeLog] +[UploadToCPAN] diff --git a/lib/Dancer/Logger/PSGI.pm b/lib/Dancer/Logger/PSGI.pm index 797def4..9134e2b 100644 --- a/lib/Dancer/Logger/PSGI.pm +++ b/lib/Dancer/Logger/PSGI.pm @@ -1,7 +1,10 @@ package Dancer::Logger::PSGI; +# ABSTRACT: PSGI Log handler for Dancer + use strict; use warnings; + our $VERSION = '0.01'; use Dancer::SharedData; @@ -19,11 +22,6 @@ sub _log { } 1; -__END__ - -=head1 NAME - -Dancer::Logger::PSGI - PSGI logger handler for Dancer =head1 SYNOPSIS @@ -44,18 +42,3 @@ With L, all your log will be send to the javas =head1 DESCRIPTION This class is an interface between your Dancer's application and B. Message will be logged in whatever logger you decided to use in your L handler. If no logger is defined, nothing will be logged. - -=head1 AUTHOR - -franck cuny Efranck@lumberjaph.netE - -=head1 SEE ALSO - -L, L, L. - -=head1 LICENSE - -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. - -=cut diff --git a/t/01_basic.t b/t/01_basic.t index cd93d94..86de374 100644 --- a/t/01_basic.t +++ b/t/01_basic.t @@ -19,7 +19,7 @@ Test::TCP::test_tcp( my $request = HTTP::Request->new(GET => "http://127.0.0.1:$port/"); my $res = $ua->request($request); ok($res->is_success, "server responded"); - like($res->content, qr/this is a warning/, "log message send"); + like($res->content, qr/this is a warning/, "log message send"); }, server => sub { my $port = shift; @@ -30,11 +30,11 @@ Test::TCP::test_tcp( setting apphandler => 'PSGI'; setting port => $port; setting access_log => 0; - setting logger => "PSGI"; + setting logger => "PSGI"; get '/' => sub { warning "this is a warning"; - return "this is a test"; + return "this is a test"; }; my $app = sub { @@ -42,8 +42,8 @@ Test::TCP::test_tcp( my $request = Dancer::Request->new($env); Dancer->dance($request); }; - $app = builder { enable "ConsoleLogger"; $app }; - Plack::Loader->auto(port => $port)->run($app); + $app = builder { enable "ConsoleLogger"; $app }; + Plack::Loader->auto(port => $port)->run($app); }, ); -- cgit 1.4.1