X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fmethod_cache.t;fp=t%2Fmethod_cache.t;h=42db3b15e7ea655d61973e64deb6fef43d78b4fe;hb=42e595b0d7841bfda100f6af7115ea41cc46b818;hp=0000000000000000000000000000000000000000;hpb=b84e9e80cb825902ddadce1a17c9dc7727a238d8;p=p5sagit%2FFunction-Parameters.git diff --git a/t/method_cache.t b/t/method_cache.t new file mode 100644 index 0000000..42db3b1 --- /dev/null +++ b/t/method_cache.t @@ -0,0 +1,20 @@ +#!perl +use warnings FATAL => 'all'; +no warnings qw(once redefine); +use strict; + +use Test::More tests => 2; + +use Function::Parameters { + method => { defaults => 'method_strict', runtime => 1 }, +}; + +# See commit 978a498e17ec54b6f1fc65f3375a62a68f321f99 in perl + +method Y::b() { 'b' } +*X::b = *Y::b; +@Z::ISA = 'X'; +is +Z->b, 'b'; + +method Y::b() { 'c' } +is +Z->b, 'c';