#!/usr/bin/perl -w

use strict;

use Argos::Map;
use Argos::Reduce;
use Vulcan::OptConf;

$| ++;

$Vulcan::OptConf::ARGC = 1;
$Vulcan::OptConf::THIS = 'argos';

my %o = Vulcan::OptConf->load()->get( qw( check ) )->dump();

=head1 SYNOPSIS

Launch argos.

=cut
my $argos;

=head3 map

$0 name --map [--test]

=cut
if ( $o{map} )
{
    $o{conf} = delete $o{map};
    $argos = Argos::Map->new( %o, name => shift );
}
=head3 map

$0 name --reduce [--test]

=cut
elsif ( $o{reduce} )
{
    $o{conf} = delete $o{reduce};
    $argos = Argos::Reduce->new( %o, name => shift );
}

$argos->run() unless $o{check}; 
exit 0;
