From beeb647d747b263423389d7e98ee8d092db081a9 Mon Sep 17 00:00:00 2001 From: "MORIYA Masaki (Gardejo)" Date: Sun, 26 Jul 2009 17:16:33 +0900 Subject: [PATCH] first commit: resources was generated by Ark's scaffold --- Makefile.PL | 12 ++++++++++++ README | 1 + lib/SimpleLinks/Web.pm | 6 ++++++ lib/SimpleLinks/Web/Controller/Root.pm | 19 +++++++++++++++++++ t/00_compile.t | 4 ++++ 5 files changed, 42 insertions(+) create mode 100644 Makefile.PL create mode 100644 README create mode 100644 lib/SimpleLinks/Web.pm create mode 100644 lib/SimpleLinks/Web/Controller/Root.pm create mode 100644 t/00_compile.t diff --git a/Makefile.PL b/Makefile.PL new file mode 100644 index 0000000..935cd12 --- /dev/null +++ b/Makefile.PL @@ -0,0 +1,12 @@ +use inc::Module::Install; +name 'SimpleLinks-Web'; +all_from 'lib/SimpleLinks/Web.pm'; + +requires 'Ark'; + +tests 't/*.t'; + +build_requires 'Test::More'; +use_test_base; +auto_include; +WriteAll; diff --git a/README b/README new file mode 100644 index 0000000..c9608df --- /dev/null +++ b/README @@ -0,0 +1 @@ +This is Perl application p5-ark-sample-simplelinks (SimpleLinks::Web). diff --git a/lib/SimpleLinks/Web.pm b/lib/SimpleLinks/Web.pm new file mode 100644 index 0000000..d457720 --- /dev/null +++ b/lib/SimpleLinks/Web.pm @@ -0,0 +1,6 @@ +package SimpleLinks::Web; +use Ark; + +our $VERSION = '0.01'; + +1; diff --git a/lib/SimpleLinks/Web/Controller/Root.pm b/lib/SimpleLinks/Web/Controller/Root.pm new file mode 100644 index 0000000..45124eb --- /dev/null +++ b/lib/SimpleLinks/Web/Controller/Root.pm @@ -0,0 +1,19 @@ +package SimpleLinks::Web::Controller::Root; +use Ark 'Controller'; + +has '+namespace' => default => ''; + +# default 404 handler +sub default :Path :Args { + my ($self, $c) = @_; + + $c->res->status(404); + $c->res->body('404 Not Found'); +} + +sub index :Path :Args(0) { + my ($self, $c) = @_; + $c->res->body('Ark Default Index'); +} + +1; diff --git a/t/00_compile.t b/t/00_compile.t new file mode 100644 index 0000000..3d698ad --- /dev/null +++ b/t/00_compile.t @@ -0,0 +1,4 @@ +use strict; +use Test::More tests => 1; + +BEGIN { use_ok 'SimpleLinks::Web' }