Open wchristian opened 2 years ago
In the following example, sub _do is not recognized at all.
$ cat Moop.pm package Moop; sub _stop { 10 } sub _do { 5 } my $old = \&_do; *_do = sub { $old->() . _stop }; 1; $ cover -delete && perl -I. -MDevel::Cover -MMoop -E 'say Moop->_do' && cover [...] 510 [...] ------- ------ ------ ------ ------ ------ ------ ------ File stmt bran cond sub pod time total ------- ------ ------ ------ ------ ------ ------ ------ Moop.pm 100.0 n/a n/a 100.0 n/a 100.0 100.0 Total 100.0 n/a n/a 100.0 n/a 100.0 100.0 ------- ------ ------ ------ ------ ------ ------ ------
Oh yeah, just in case it's not clear. If you convert Moop to a script and run it directly instead of use()ing it, _do is recognized.
In the following example, sub _do is not recognized at all.