use
strict;
use
warnings;
use
5.006;
use
Path::Tiny;
my
$tmpdir
= tempdir;
unshift
@INC
,
$tmpdir
;
my
%paths
= (
't/write_module.t'
=>
'Test::PackT'
,
'LICENSE'
=>
'Test::LICENSE'
,
'lib/Asset/Pack.pm'
=>
'Test::AssetPack'
,
);
foreach
my
$p
(
keys
%paths
) {
my
$content
= path(
$p
)->slurp_raw;
write_module(
$p
,
$paths
{
$p
},
$tmpdir
);
use_ok(
$paths
{
$p
} );
{
no
strict
'refs'
;
eq_or_diff( ${
"$paths{$p}::content"
},
$content
,
"Loaded and decoded copy of $p"
);
}
}