e JSON -convert_blessed_universally;
use URI;
our $report;
use Mail::DMARC::PurePerl;
my %mimes = (
css => 'text/css',
html => 'text/html',
js => 'application/javascript',
json =
> 'application/json',
);
sub new {
my $class = shift;
return bless {}, $class;
}
sub dmarc_httpd {
my $self = shift;
$report = shift;
my $port = $report->config->{http}{port}
urn report_json_report() if $path eq '/dmarc/json/report';
return report_json_rr() if $path eq '/dmarc/json/row';
return serve_validator() if $path eq '/dmarc/json/validate';