1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
#!perl
use Test::Without::Module ("Module::Runtime");
use strict ("subs", "vars", "refs");
use warnings ("all");
use Test::More;
BEGIN
{
$ENV{CLONE_CHOOSE_PREFERRED_BACKEND} and eval "use $ENV{CLONE_CHOOSE_PREFERRED_BACKEND}; 1;";
$@ and plan skip_all => "No $ENV{CLONE_CHOOSE_PREFERRED_BACKEND} found.";
}
use Clone::Choose;
my %src = (
simple => "yeah",
ary => [qw(foo bar)],
hash => {foo => "bar"}
);
my $tgt = clone(\%src);
is_deeply(\%src, $tgt);
done_testing;
|