☰
Debian Codegraph
@
1.52-1
/
/
tests
/
redefine_sub
☽
☼
tests/redefine_sub
code
plain
raw
Artistic
or
GPL-1+
2001-2026, Paul Johnson
(
[email protected]
)
debian/copyright
1
#!/usr/bin/perl
2
3
sub s1 {
4
my $t = shift;
5
if ($t > 5) {
6
print 5;
7
} else {
8
print $t;
9
}
10
}
11
12
my $c = *main::s1{CODE};
13
14
*main::s1 = sub {
15
print "extra";
16
&$c(@_);
17
};
18
19
s1(1);
20
s1(7);