<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,24 +1,8 @@
 #!perl6
 use v6;
-BEGIN { @*INC.push('lib'); }
+BEGIN { @*INC.unshift('lib'); }
 use Installer;
 
-my Installer $proto .= new;
-
-given @*ARGS.shift {
-    when undef       { exit; }
-    when 'install'   { $proto.install(  @*ARGS) }
-    when 'update'    { $proto.update(   @*ARGS) }
-    when 'uninstall' { $proto.uninstall(@*ARGS) }
-    when 'test'      { $proto.test(     @*ARGS) }
-    when 'showdeps'  { $proto.showdeps( @*ARGS) }
-    default {
-        .say for
-            &quot;Unrecognized subcommand '$_'. A typical command is:&quot;,
-            &quot;'./proto install &lt;projectname&gt;', also update, test, showdeps,&quot;
-                ~ &quot; uninstall.&quot;,
-            &quot;See the README for more details&quot;
-     }
-}
+Installer.new.subcommand-dispatch(@*ARGS.shift).(@*ARGS);
 
 # vim: ft=perl6</diff>
      <filename>installer</filename>
    </modified>
    <modified>
      <diff>@@ -9,6 +9,23 @@ class Installer {
         )
     }
 
+    method subcommand-dispatch($_) {
+        when undef       { exit; }
+        when 'install'   { -&gt; *@projects { self.install(  @projects) } }
+        when 'update'    { -&gt; *@projects { self.update(   @projects) } }
+        when 'uninstall' { -&gt; *@projects { self.uninstall(@projects) } }
+        when 'test'      { -&gt; *@projects { self.test(     @projects) } }
+        when 'showdeps'  { -&gt; *@projects { self.showdeps( @projects) } }
+        default {
+            .say for
+                &quot;Unrecognized subcommand '$_'. A typical command is:&quot;,
+                &quot;'./proto install &lt;projectname&gt;', also update, test, showdeps,&quot;
+                    ~ &quot; uninstall.&quot;,
+                &quot;See the README for more details&quot;;
+            exit;
+        }
+    }
+
     method install(*@projects) {
         my @projects-to-install;
         my $missing-projects = False;</diff>
      <filename>lib/Installer.pm</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f7f29d46c098df0b3d14c71da8ca00c2c7c77b30</id>
    </parent>
  </parents>
  <author>
    <name>Carl Masak</name>
    <email>cmasak@gmail.com</email>
  </author>
  <url>http://github.com/masak/proto/commit/651cba188e9c9e763f5e02d0fced293ff3d4b743</url>
  <id>651cba188e9c9e763f5e02d0fced293ff3d4b743</id>
  <committed-date>2009-05-11T09:12:47-07:00</committed-date>
  <authored-date>2009-05-11T09:12:47-07:00</authored-date>
  <message>moved dispatching code into Installer.pm

The more that's precompiled, the better. :)</message>
  <tree>7d7bd49a2cbe52a97b53bbc209f622649cb9a0b2</tree>
  <committer>
    <name>Carl Masak</name>
    <email>cmasak@gmail.com</email>
  </committer>
</commit>
