#!/usr/bin/env perl 
use warnings;
use strict;
use App::Settings::CLI;
use lib 'lib';
use lib '../../lib';
# Moose likes generating very noisy backtraces. Most users don't need to see
# anything more than the root cause of the failure. Developers and the curious
# can set environment variable SD_VERBOSE_ERROR to retain the backtraces.
# When Moose's error throwing is more malleable we should switch to using that.
unless ($ENV{'TEST_VERBOSE'}) {
    $SIG{__DIE__} = sub {
        my $line = shift;
        $line =~ s/\n.*//s if ($line =~ /at line/s);
        $line .= "\n"; $line =~ s/\n+$/\n/gs;
        die $line;
    };
}

my $cli = App::Settings::CLI->new;
$cli->run_one_command(@ARGV);

