<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -126,7 +126,7 @@ task :install do
 #!/bin/sh
 PROGRAM=$1
 shift
-erl -noshell +K true -s Loader start $PROGRAM -s init stop -extra $*&quot;
+erl -noshell +K true -s reia erl_load $PROGRAM -s init stop -extra $*&quot;
   end
 
   File.open(PREFIX + &quot;/bin/ire&quot;, &quot;w&quot;, 0755) do |f| f &lt;&lt; &quot;#!/bin/sh</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -3,4 +3,4 @@
 PROGRAM=$1
 shift
 
-erl -pa ebin -pa ../ebin -noshell +K true -s Loader start $PROGRAM -s init stop -extra $*
\ No newline at end of file
+erl -pa ebin -pa ../ebin -noshell +K true -s reia erl_load $PROGRAM -s init stop -extra $*
\ No newline at end of file</diff>
      <filename>bin/reia</filename>
    </modified>
    <modified>
      <diff>@@ -10,8 +10,8 @@ module Loader
     read_input([])
   end
     
-  def start(args)
-    (:ok, input) = file::read_file(args[0])
+  def start(file)
+    (:ok, input) = file::read_file(file)
     eval_input(input.to_string())
   end
 </diff>
      <filename>src/core/Loader.re</filename>
    </modified>
    <modified>
      <diff>@@ -11,7 +11,8 @@
   invoke/3, invoke/4,
   parse/1,
   spawn/2, spawn/3,
-  spawn_link/2, spawn_link/3
+  spawn_link/2, spawn_link/3,
+  load_file/1, erl_load/1
 ]).
 
 % Call the given Reia function from the Erlang environment, automatically 
@@ -49,4 +50,13 @@ spawn(Class, Arguments, Block) -&gt;
 % its process to this one
 spawn_link(Class, Arguments) -&gt; reia:spawn(Class, Arguments, nil).
 spawn_link(Class, Arguments, Block) -&gt;
-  reia_class:inst(Class, Arguments, Block).
\ No newline at end of file
+  reia_class:inst(Class, Arguments, Block).
+  
+% Load the given file through the Reia loader
+load_file(File) -&gt;
+  reia:apply('Loader', 'start', [File]).
+
+% Load a file when invoked from the Erlang command line
+% Handles funky argument thunking coming off the shell
+erl_load([File]) -&gt;
+  load_file(File).
\ No newline at end of file</diff>
      <filename>src/core/reia.erl</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>52f073d7b647c3455cd391bd652ae0e11c465e35</id>
    </parent>
  </parents>
  <author>
    <name>Tony Arcieri</name>
    <email>tony@medioh.com</email>
  </author>
  <url>http://github.com/tarcieri/reia/commit/178deaa0997d608b09a886e9bbd537ab094cf5e6</url>
  <id>178deaa0997d608b09a886e9bbd537ab094cf5e6</id>
  <committed-date>2009-03-25T23:14:09-07:00</committed-date>
  <authored-date>2009-03-25T23:14:09-07:00</authored-date>
  <message>Have the 'reia' script thunk through the reia module, rather than calling loader directly</message>
  <tree>b8f2f671f3287671b93ae8ab78f0118d2a79c909</tree>
  <committer>
    <name>Tony Arcieri</name>
    <email>tony@medioh.com</email>
  </committer>
</commit>
