#!/usr/bin/env perl
package yath;
use strict;
use warnings;

our $VERSION = '0.000012';

use App::Yath;

T2_DO_FILE: {
    my $yath = App::Yath->new(args => \@ARGV);
    my $exit = $yath->run();
    exit($exit);
}

my $file = $Test2::Harness::Runner::DO_FILE
    or die "No file to run!";

my $set_env = $Test2::Harness::Runner::SET_ENV
    or die "No set-env sub!";

# Test files do not always return a true value, so we cannot use require. We
# also cannot trust $!
package main;
$set_env->();
$@ = '';
do $file;
die $@ if $@;
exit 0;
