X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst.pm;h=89b7f9f20df59fe18231e07a30c2518c98642b57;hp=c904ed356702695c077d696b82ba9cd9207c13b3;hb=746380d1782b04934f7fafe76d96d32c97379994;hpb=f4a57de40a851a87a5c9513fd8cb55dbd6cec12c diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index c904ed3..89b7f9f 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -17,7 +17,9 @@ use Time::HiRes qw/gettimeofday tv_interval/; use URI; use Scalar::Util qw/weaken/; -__PACKAGE__->mk_accessors(qw/counter depth request response state/); +__PACKAGE__->mk_accessors( + qw/counter depth request response state action namespace/ +); # Laziness++ *comp = \&component; @@ -167,6 +169,10 @@ Specify log level. =over 4 +=item $c->action + +Accessor for the current action + =item $c->comp($name) =item $c->component($name) @@ -251,6 +257,10 @@ from the function. sub forward { my $c = shift; $c->dispatcher->forward( $c, @_ ) } +=item $c->namespace + +Accessor to the namespace of the current action + =item $c->setup Setup. @@ -524,16 +534,17 @@ sub stash { return $c->{stash}; } -=head1 $c->welcome_message +=item $c->welcome_message Returns the Catalyst welcome HTML page. =cut sub welcome_message { - my $c = shift; - my $name = $c->config->{name}; - my $logo = $c->uri_for('/static/images/catalyst_logo.png'); + my $c = shift; + my $name = $c->config->{name}; + my $logo = $c->uri_for('/static/images/catalyst_logo.png'); + my $prefix = Catalyst::Utils::appprefix( ref $c ); return <<"EOF"; @@ -616,41 +627,26 @@ sub welcome_message {

Welcome to the wonderful world of Catalyst. - This MVC framework will make web development - something you had never expected it to be: - Fun, rewarding and quick.

+ This MVC + framework will make web development something you had + never expected it to be: Fun, rewarding and quick.

What to do now?

That really depends on what you want to do. We do, however, provide you with a few starting points.

If you want to jump right into web development with Catalyst you might want to check out the documentation.

-
perldoc Catalyst::Manual
-perldoc Catalyst::Manual::Intro
-

If you would like some background information on the - MVC-pattern, these links might be of help to you.

- +
perldoc Catalyst::Manual::Intro
+perldoc Catalyst::Manual

What to do next?

Next it's time to write an actual application. Use the - helper scripts to generate controllers, models and views, they - can save you a lot of work. Also, be sure to check out the vast - and growing collection of plugins for Catalyst on CPAN, you are - likely to find what you need there. + helper scripts to generate controllers, + models and + views, + they can save you a lot of work.

+
script/${prefix}_create.pl -help
+

Also, be sure to check out the vast and growing + collection of plugins for Catalyst on CPAN, + you are likely to find what you need there.

Need help?

@@ -1681,7 +1677,7 @@ Sebastian Riedel, C =head1 LICENSE This library is free software . You can redistribute it and/or modify it under -the same terms as perl itself. +the same terms as Perl itself. =cut