SKIP: {
my $SKIP;
- unless (MGf_COPY) {
+ if (!MGf_COPY) {
$SKIP = 'No copy magic for this perl';
} else {
- eval "use Tie::Array";
- $SKIP = 'Tie::Array required to test clear magic on tied array values' if $@;
+ local $@;
+ unless (eval { require Tie::Array; 1 }) {
+ $SKIP = 'Tie::Array required to test clear magic on tied array values';
+ }
}
skip $SKIP => 3 if $SKIP;