X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FHelper.pm;h=d4fd807cd2c7874bd2aeadbb27065e002e15840a;hb=8e40e7efd2ac07a1b3aae3dd0734320b03b7e9df;hp=cc14c9403ee877bd8c0cd34b2a99128868635caf;hpb=03a538159d1fff846548900dd12b86a7078ff443;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Helper.pm b/lib/Catalyst/Helper.pm index cc14c94..d4fd807 100644 --- a/lib/Catalyst/Helper.pm +++ b/lib/Catalyst/Helper.pm @@ -150,6 +150,17 @@ use_ok( Catalyst::Test, '$name' ); ok( request('/')->is_success ); EOF + my $pc = IO::File->new("> $t/02podcoverage.t") + or die qq/Couldn't open "$t\/02podcoverage.t", "$!"/; + print $pc <<"EOF"; +use Test::More; + +eval "use Test::Pod::Coverage 1.04"; +plan skip_all => 'Test::Pod::Coverage 1.04 required' if \$@; +plan skip_all => 'set TEST_POD to enable this test' unless \$ENV{TEST_POD}; + +all_pod_coverage_ok(); +EOF } sub _mk_server { @@ -257,8 +268,8 @@ test [options] uri -help display this help and exits Examples: - test http://localhost/some_action - test /some_action + perl test http://localhost/some_action + perl test /some_action See also: perldoc Catalyst::Manual @@ -322,13 +333,13 @@ create [options] model|view|controller name [helper] [options] -help display this help and exits Examples: - create controller My::Controller - create view My::View - create view MyView TT - create view TT TT - create model My::Model - create model SomeDB CDBI dbi:SQLite:/tmp/my.db - create model AnotherDB CDBI dbi:Pg:dbname=foo root 4321 + perl create controller My::Controller + perl create view My::View + perl create view MyView TT + perl create view TT TT + perl create model My::Model + perl create model SomeDB CDBI dbi:SQLite:/tmp/my.db + perl create model AnotherDB CDBI dbi:Pg:dbname=foo root 4321 See also: perldoc Catalyst::Manual @@ -508,6 +519,26 @@ EOF } } +=head1 HELPERS + +Helpers are classes that provide two methods. + + * mk_compclass - creates the Component class + * mk_comptest - creates the Component test + +So when you call C, create would try to execute +Catalyst::Helper::View::TT->mk_compclass and +Catalyst::Helper::View::TT->mk_comptest. + +See L and L for +examples. + +All helper classes should be under one of the following namespaces. + + Catalyst::Helper::Model:: + Catalyst::Helper::View:: + Catalyst::Helper::Controller:: + =head1 SEE ALSO L, L, L,