#!/usr/bin/env perl
use 5.14.0;
use warnings;
use Carp;

use Perl5::Build::Warnings;
use Data::Dump qw(dd pp);

croak "Must provide path to 'make' output"
    unless @ARGV;

my @inputs = @ARGV;
for (@inputs) {
    croak "Cannot locate file '$_'" unless -f $_;
}

for my $f (@inputs) {
    say "File:  $f";
    say '';
    my $self = Perl5::Build::Warnings->new( { file => $f } );
    my $aref = $self->get_warnings;
    dd $aref;
    say '';
}
