Added $c->config->{show_internal_actions}
[catagits/Catalyst-Runtime.git] / lib / Catalyst.pm
index b7bb450..ef0a506 100644 (file)
@@ -38,14 +38,12 @@ our $DETACH    = "catalyst_detach\n";
 require Module::Pluggable::Fast;
 
 # Helper script generation
-our $CATALYST_SCRIPT_GEN = 8;
+our $CATALYST_SCRIPT_GEN = 9;
 
 __PACKAGE__->mk_classdata($_)
   for qw/components arguments dispatcher engine log/;
 
-our $VERSION = '5.49_01';
-
-sub version { return $Catalyst::VERSION }
+our $VERSION = '5.49_02';
 
 sub import {
     my ( $class, @arguments ) = @_;
@@ -263,6 +261,23 @@ sub forward { my $c = shift; $c->dispatcher->forward( $c, @_ ) }
 
 Accessor to the namespace of the current action
 
+=item $c->path_to(@path)
+
+Merges C<@path> with $c->config->{home} and returns a L<Path::Class> object.
+
+For example:
+
+    $c->path_to( 'db', 'sqlite.db' );
+
+=cut
+
+sub path_to {
+    my ( $c, @path ) = @_;
+    my $path = dir( $c->config->{home}, @path );
+    if ( -d $path ) { return $path }
+    else { return file( $c->config->{home}, @path ) }
+}
+
 =item $c->setup
 
 Setup.
@@ -679,7 +694,7 @@ perldoc <a href="http://cpansearch.perl.org/dist/Catalyst/lib/Catalyst/Manual.po
                      </li>
                  </ul>
                  <h2>In conclusion</h2>
-                 <p>The Catalyst team hope you will enjoy using Catalyst as much 
+                 <p>The Catalyst team hopes you will enjoy using Catalyst as much 
                     as we enjoyed making it. Please contact us if you have ideas
                     for improvement or other feedback.</p>
              </div>
@@ -1536,8 +1551,27 @@ sub write {
     return $c->engine->write( $c, @_ );
 }
 
+=item version
+
+Returns the Catalyst version number. mostly useful for powered by messages
+in template systems.
+
+=cut
+
+sub version { return $Catalyst::VERSION }
+
 =back
 
+=head1 INTERNAL ACTIONS
+
+Catalyst uses internal actions like C<_DISPATCH>, C<_BEGIN>, C<_AUTO>
+C<_ACTION> and C<_END>, these are by default not shown in the private
+action table.
+
+But you can deactivate this with a config parameter.
+
+    MyApp->config->{show_internal_actions} = 1;
+
 =head1 CASE SENSITIVITY
 
 By default Catalyst is not case sensitive, so C<MyApp::C::FOO::Bar> becomes
@@ -1681,6 +1715,8 @@ Matt S Trout
 
 Robert Sedlacek
 
+Sam Vilain
+
 Tatsuhiko Miyagawa
 
 Ulf Edvinsson