Austin Ziegler wrote:
> On 4/7/06, Pistos Christou <jesusrubsyou.5.pistos / geoshell.com> wrote:
>>
>> Could you show some example code?  I've never heard of this "END block"
>> thing.  I thought __END__ in Perl made the interpreter stop and ignore
>> everything below that line.
> 
> It does.
> 
> However, that's not what Eric is talking about.
> 
> He's talking about:
> 
>   END {
>     # put your cleanup code here
>   }
> 

The problem with this is that it will run every time, no matter what 
tasks were invoked from the rake command line.  It might work better to 
do something like this:

  task :cleanup do
    at_exit {
      # cleanup code here
    }
  end

  task :main_task => [:other_prerequisites, :cleanup] do
    # Task code that needs cleaning up
  end

--
-- Jim Weirich

-- 
Posted via http://www.ruby-forum.com/.