use
lib
qw( ./lib ./t/lib ../inc ./inc )
;
my
$type
= ArrayRef[Int];
my
$coderef1
=
$type
->_overload_coderef;
my
$coderef2
=
$type
->_overload_coderef;
is(
$coderef1
,
$coderef2
,
'overload coderef gets cached instead of being rebuilt'
);
note
"Sub::Quote required for further testing"
;
done_testing;
exit
(0);
};
my
$coderef3
=
$type
->_overload_coderef;
isnt(
$coderef3
,
$coderef1
,
'loading Sub::Quote triggers rebuilding overload coderef'
);
my
$coderef4
=
$type
->_overload_coderef;
is(
$coderef3
,
$coderef4
,
'overload coderef gets cached again instead of being rebuilt'
);
done_testing;