Release commit for 0.35
[catagits/Catalyst-Plugin-ConfigLoader.git] / t / lib / TestApp / Controller / Config.pm
index 1951de2..989828a 100644 (file)
@@ -1,13 +1,18 @@
-package TestApp::Controller::Config;\r
-\r
-use strict;\r
-use warnings;\r
-\r
-use base qw( Catalyst::Controller );\r
-\r
-sub index : Private {\r
-       my( $self, $c ) = @_;\r
-       $c->res->output( $self->{ foo } );\r
-}\r
-\r
-1;
\ No newline at end of file
+package TestApp::Controller::Config;
+
+use strict;
+use warnings;
+
+use base qw( Catalyst::Controller );
+
+sub index : Private {
+    my ( $self, $c ) = @_;
+    $c->res->output( $self->{ foo } );
+}
+
+sub appconfig : Global {
+    my ( $self, $c, $var ) = @_;
+    $c->res->body( $c->config->{ $var } );
+}
+
+1;