[Bps-public-commit] r16969 - Prophet/trunk/lib/Prophet

jesse at bestpractical.com jesse at bestpractical.com
Fri Nov 21 19:15:50 EST 2008


Author: jesse
Date: Fri Nov 21 19:15:50 2008
New Revision: 16969

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

Log:
* become able to pass arguments to templates. 
* remove extra / when building request paths

Modified: Prophet/trunk/lib/Prophet/Server.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/Server.pm	(original)
+++ Prophet/trunk/lib/Prophet/Server.pm	Fri Nov 21 19:15:50 2008
@@ -16,7 +16,7 @@
 has cgi       => ( isa => 'Maybe[CGI]', is  => 'rw' );
 has read_only => ( is  => 'rw',         isa => 'Bool' );
 
- sub run{
+sub run {
     my $self      = shift;
     my $publisher = eval {
         require Net::Rendezvous::Publish;
@@ -61,7 +61,7 @@
      my $d =$dispatcher_class->new( server => $self );
 
 
-    $d->run( $cgi->request_method . "/" . $cgi->path_info, $d )
+    $d->run( $cgi->request_method .  $cgi->path_info, $d )
         || $self->_send_404;
 
 };
@@ -176,7 +176,7 @@
     my $p    = shift;
     if ( Template::Declare->has_template($p) ) {
         Prophet::Server::View->app_handle( $self->app_handle );
-        my $content = Template::Declare->show($p);
+        my $content = Template::Declare->show($p, at _);
         return $self->send_content( content_type => 'text/html', content      => $content,);
     }
     return undef;



More information about the Bps-public-commit mailing list