1#!perl 2 3use strict ("subs", "vars", "refs"); 4use warnings ("all"); 5BEGIN { $ENV{CLONE_CHOOSE_PREFERRED_BACKEND} = "Clone::PP"; } 6END { delete $ENV{CLONE_CHOOSE_PREFERRED_BACKEND} } # for VMS 7 8use Test::More; 9 10BEGIN 11{ 12 $ENV{CLONE_CHOOSE_PREFERRED_BACKEND} and eval "use $ENV{CLONE_CHOOSE_PREFERRED_BACKEND}; 1;"; 13 $@ and plan skip_all => "No $ENV{CLONE_CHOOSE_PREFERRED_BACKEND} found."; 14} 15 16use Clone::Choose; 17 18my @backends = Clone::Choose->get_backends; 19my $backend = Clone::Choose->backend; 20 21ok($ENV{CLONE_CHOOSE_PREFERRED_BACKEND} and $backend eq $ENV{CLONE_CHOOSE_PREFERRED_BACKEND} or grep { m/^$backend$/ } @backends); 22 23done_testing; 24 25 26