[Bps-public-commit] r15791 - in Prophet/trunk/lib/Prophet: Server

jesse at bestpractical.com jesse at bestpractical.com
Sun Sep 7 22:43:00 EDT 2008


Author: jesse
Date: Sun Sep  7 22:43:00 2008
New Revision: 15791

Modified:
   Prophet/trunk/lib/Prophet/Server.pm
   Prophet/trunk/lib/Prophet/Server/View.pm

Log:

* Get an app_handle into our templates. Kinda hacky so far



Modified: Prophet/trunk/lib/Prophet/Server.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/Server.pm	(original)
+++ Prophet/trunk/lib/Prophet/Server.pm	Sun Sep  7 22:43:00 2008
@@ -79,6 +79,7 @@
 
 
     if (Template::Declare->has_template($p)) {
+        Prophet::Server::View->app_handle($self->app_handle);
         my $content = Template::Declare->show($p);
 
         return $self->_send_content(
@@ -88,7 +89,7 @@
 
     }
 
-}
+};
 
 sub _handle_request_get_replica {
 	my $self = shift;

Modified: Prophet/trunk/lib/Prophet/Server/View.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/Server/View.pm	(original)
+++ Prophet/trunk/lib/Prophet/Server/View.pm	Sun Sep  7 22:43:00 2008
@@ -6,6 +6,12 @@
 use Prophet::Server::ViewHelpers;
 use Params::Validate;
 
+our $APP_HANDLE;
+sub app_handle {
+    my $self = shift;
+    $APP_HANDLE = shift if (@_);
+    return $APP_HANDLE;
+}
 sub default_page_title { 'Prophet' }
 
 template head => sub {



More information about the Bps-public-commit mailing list