<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,6 +1,7 @@
 This file documents the revision history for Perl extension Mojo.
 
 0.999903 2009-11-10 00:00:00
+        - Added ladders to Mojolicious::Lite, they are like bridges but lite.
         - Added encoding support to renderer. (likhatskiy)
 
 0.999902 2009-11-01 00:00:00</diff>
      <filename>Changes</filename>
    </modified>
    <modified>
      <diff>@@ -152,9 +152,10 @@ sub render {
 sub template_name {
     my ($self, $options) = @_;
 
-    my $template = $options-&gt;{template} || '';
-    my $format   = $options-&gt;{format};
-    my $handler  = $options-&gt;{handler};
+    # Template?
+    return unless my $template = $options-&gt;{template} || '';
+    return unless my $format   = $options-&gt;{format};
+    return unless my $handler  = $options-&gt;{handler};
 
     return &quot;$template.$format.$handler&quot;;
 }</diff>
      <filename>lib/MojoX/Renderer.pm</filename>
    </modified>
    <modified>
      <diff>@@ -10,8 +10,9 @@ use base 'Mojolicious';
 use File::Spec;
 use FindBin;
 
-# Singleton
+# Singletons
 my $APP;
+my $ROUTES;
 
 # It's the future, my parents, my co-workers, my girlfriend,
 # I'll never see any of them ever again... YAHOOO!
@@ -28,6 +29,9 @@ sub import {
     # Initialize app
     $APP = $class-&gt;new;
 
+    # Initialize routes
+    $ROUTES = $APP-&gt;routes;
+
     # Route generator
     my $route = sub {
         my ($methods, @args) = @_;
@@ -72,8 +76,14 @@ sub import {
         $defaults ||= {};
         $defaults = {%$defaults, callback =&gt; $cb};
 
+        # Create bridge
+        return $ROUTES =
+          $APP-&gt;routes-&gt;bridge($pattern, {@$constraints})-&gt;over($conditions)
+          -&gt;to($defaults)-&gt;name($name)
+          if !ref $methods &amp;&amp; $methods eq 'ladder';
+
         # Create route
-        $APP-&gt;routes-&gt;route($pattern, {@$constraints})-&gt;over($conditions)
+        $ROUTES-&gt;route($pattern, {@$constraints})-&gt;over($conditions)
           -&gt;via($methods)-&gt;to($defaults)-&gt;name($name);
     };
 
@@ -82,10 +92,11 @@ sub import {
     no strict 'refs';
 
     # Export
-    *{&quot;${caller}::app&quot;}  = sub {$APP};
-    *{&quot;${caller}::any&quot;}  = sub { $route-&gt;(ref $_[0] ? shift : [], @_) };
-    *{&quot;${caller}::get&quot;}  = sub { $route-&gt;('get', @_) };
-    *{&quot;${caller}::post&quot;} = sub { $route-&gt;('post', @_) };
+    *{&quot;${caller}::app&quot;}    = sub {$APP};
+    *{&quot;${caller}::any&quot;}    = sub { $route-&gt;(ref $_[0] ? shift : [], @_) };
+    *{&quot;${caller}::get&quot;}    = sub { $route-&gt;('get', @_) };
+    *{&quot;${caller}::ladder&quot;} = sub { $route-&gt;('ladder', @_) };
+    *{&quot;${caller}::post&quot;}   = sub { $route-&gt;('post', @_) };
 
     # Shagadelic!
     *{&quot;${caller}::shagadelic&quot;} = sub {</diff>
      <filename>lib/Mojolicious/Lite.pm</filename>
    </modified>
    <modified>
      <diff>@@ -28,8 +28,8 @@ sub new {
             my ($r, $c, $output, $options) = @_;
 
             # Template
-            my $t     = $r-&gt;template_name($options);
-            my $path  = $r-&gt;template_path($options);
+            return unless my $t    = $r-&gt;template_name($options);
+            return unless my $path = $r-&gt;template_path($options);
             my $cache = $options-&gt;{cache} || $path;
 
             # Check cache</diff>
      <filename>lib/Mojolicious/Renderer.pm</filename>
    </modified>
    <modified>
      <diff>@@ -7,7 +7,7 @@ use warnings;
 
 use utf8;
 
-use Test::More tests =&gt; 122;
+use Test::More tests =&gt; 136;
 
 # Wait you're the only friend I have...
 # You really want a robot for a friend?
@@ -138,6 +138,25 @@ get '/koi8-r' =&gt; sub {
     app-&gt;renderer-&gt;encoding(undef);
 };
 
+ladder sub {
+    my $self = shift;
+    return unless $self-&gt;req-&gt;headers-&gt;header('X-Bender');
+    $self-&gt;res-&gt;headers-&gt;header('X-Ladder' =&gt; 23);
+    return 1;
+};
+
+# GET /with_ladder
+get '/with_ladder' =&gt; sub {
+    my $self = shift;
+    $self-&gt;render_text('Ladders are cool!');
+};
+
+# GET /with_ladder_too
+get '/with_ladder_too' =&gt; sub {
+    my $self = shift;
+    $self-&gt;render_text('Ladders are cool too!');
+};
+
 # Oh Fry, I love you more than the moon, and the stars,
 # and the POETIC IMAGE NUMBER 137 NOT FOUND
 my $app = Mojolicious::Lite-&gt;new;
@@ -485,6 +504,41 @@ $client-&gt;get(
     }
 )-&gt;process;
 
+# GET /with_ladder
+$client-&gt;get(
+    '/with_ladder' =&gt; ('X-Bender' =&gt; 'Rodriguez') =&gt; sub {
+        my ($self, $tx) = @_;
+        is($tx-&gt;res-&gt;code,                            200);
+        is($tx-&gt;res-&gt;headers-&gt;server,                 'Mojo (Perl)');
+        is($tx-&gt;res-&gt;headers-&gt;header('X-Powered-By'), 'Mojo (Perl)');
+        is($tx-&gt;res-&gt;headers-&gt;header('X-Ladder'),     '23');
+        is($tx-&gt;res-&gt;body,                            'Ladders are cool!');
+    }
+)-&gt;process;
+
+# GET /with_ladder_too
+$client-&gt;get(
+    '/with_ladder_too' =&gt; ('X-Bender' =&gt; 'Rodriguez') =&gt; sub {
+        my ($self, $tx) = @_;
+        is($tx-&gt;res-&gt;code,                            200);
+        is($tx-&gt;res-&gt;headers-&gt;server,                 'Mojo (Perl)');
+        is($tx-&gt;res-&gt;headers-&gt;header('X-Powered-By'), 'Mojo (Perl)');
+        is($tx-&gt;res-&gt;headers-&gt;header('X-Ladder'),     '23');
+        is($tx-&gt;res-&gt;body, 'Ladders are cool too!');
+    }
+)-&gt;process;
+
+# GET /with_ladder_too
+$client-&gt;get(
+    '/with_ladder_too' =&gt; sub {
+        my ($self, $tx) = @_;
+        is($tx-&gt;res-&gt;code,                            404);
+        is($tx-&gt;res-&gt;headers-&gt;server,                 'Mojo (Perl)');
+        is($tx-&gt;res-&gt;headers-&gt;header('X-Powered-By'), 'Mojo (Perl)');
+        like($tx-&gt;res-&gt;body, qr/Oops!/);
+    }
+)-&gt;process;
+
 __DATA__
 @@ outerlayout.html.ep
 Hello</diff>
      <filename>t/mojolicious/lite_app.t</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d7cfa81eb6f2fc0e4f2b123babb097da524ffcac</id>
    </parent>
  </parents>
  <author>
    <name>Sebastian Riedel</name>
    <email>sri@labs.kraih.com</email>
  </author>
  <url>http://github.com/kraih/mojo/commit/d8fb4f372d9e87fb8133722c925f9183600e66a6</url>
  <id>d8fb4f372d9e87fb8133722c925f9183600e66a6</id>
  <committed-date>2009-11-11T04:15:31-08:00</committed-date>
  <authored-date>2009-11-11T04:15:31-08:00</authored-date>
  <message>added ladders to Mojolicious::Lite, they are like bridges but lite</message>
  <tree>a87cacbc0445d47df4c97ff235cb2b8be01db9be</tree>
  <committer>
    <name>Sebastian Riedel</name>
    <email>sri@labs.kraih.com</email>
  </committer>
</commit>
