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

use Data::Dumper;
$Data::Dumper::Sortkeys = 1;
$Data::Dumper::Quotekeys = 0;

use lib 'lib';
use Mail::DMARC::PurePerl;

my $domain = $ARGV[0] or die "\n $0 domain.name\n\n";

my $dmarc = Mail::DMARC::PurePerl->new;
$dmarc->header_from($domain);
my $policy = $dmarc->discover_policy();
print Dumper( $policy ) and exit if $policy;

print "no DMARC policy published for $domain\n";

# PODNAME: dmarc_lookup
# ABSTRACT: look up DMARC policy for a domain

__END__

=pod

=head1 NAME

dmarc_lookup - look up DMARC policy for a domain

=head1 VERSION

version 0.20130524

=head1 AUTHORS

=over 4

=item *

Matt Simerson <msimerson@cpan.org>

=item *

Davide Migliavacca <shari@cpan.org>

=back

=head1 CONTRIBUTOR

ColocateUSA.net <company@colocateusa.net>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by ColocateUSA.com.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut
