- or download this
package orig::functions;
BEGIN {
...
sub func3 {
print "world";
}
- or download this
package replace::functions;
BEGIN {
...
sub funcy {
print "new y";
}
- or download this
# program A
use orig::functions qw(func1 func2 func3);
print func1(), func2(), func3(), "\n";
- or download this
# program B
...
print func1(), func2(), func3(), "\n";
print funcx(), "\n";