File: method_cache.t

package info (click to toggle)
libfunction-parameters-perl 2.002005-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 624 kB
  • sloc: perl: 3,945; makefile: 3
file content (21 lines) | stat: -rw-r--r-- 431 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!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:
# http://perl5.git.perl.org/perl.git/commitdiff/978a498e17ec5

method Y::b() { 'b' }
*X::b = *Y::b;
@Z::ISA = 'X';
is +Z->b, 'b';

method Y::b() { 'c' }
is +Z->b, 'c';