#!/usr/bin/perl
use warnings;
use strict;

use Getopt::Long;
use Test::BrewBuild;

my (%args, $count, $help);

GetOptions(
    "debug"     => \$args{debug},
    "reload"    => \$args{reload},
    "version=s@" => \$args{version},
    "count=i"   => \$count,
    "help"      => \$help,
);

if ($help){
    print <<EOF;
    
    Usage: perl build/brewbuild.pl [options]

    Options:

    --debug | -d:   Bool, enable verbosity
    --count | -c:   Integer, how many random versions of perl to install
    --reload | -r:  Bool, remove all installed perls (less the current one)
                    before installation of new ones
    --verion | -v:  String, the number portion of an available perl version
                    according to "perlbrew available" Note that only one is
                    allowed at this time
    --help | -h:    print this help message
EOF
exit;
}

my $brew = Test::BrewBuild->new(%args);

$brew->run($count);


