package LogReportTest;
BEGIN { # set test env otherwise development config settings loaded - unless explicitly
# set at command-line: "export DANCER_ENVIRONMENT=development; prove -lv t/"
if ( $main::no_show_errors ) {
$ENV{DANCER_ENVIRONMENT} ||= $ENV{PLACK_END} ||= 'test-no-errors';
} else {
$ENV{DANCER_ENVIRONMENT} ||= $ENV{PLACK_ENV} ||= 'test';
} # warn $ENV{DANCER_ENVIRONMENT}; warn $ENV{PLACK_ENV};
}
use Import::Into;
use Exporter ();
use FindBin; # warn $FindBin::Bin;
use Data::Printer;
open my $fh, '>' . $FindBin::Bin . '/mech.htm' or die $!; # warn $FindBin::Bin;
sub print_output {
my $response = shift;
print $fh $response->content or die $!;
}
our @EXPORT = qw(print_output);
sub import {
Test::WWW::Mechanize->import::into(1);
LWP::Protocol::PSGI->import::into(1);
Data::Printer->import::into(1);
Data::Dumper->import::into(1);
Modern::Perl->import::into(1);
Test::More->import::into(1);
LogReport->import::into(1);
goto &Exporter::import;
}
1;