package Orig;
use Exporter;
use vars qw( @ISA @EXPORT );
@EXPORT = qw( orig repl );
sub orig { print "&Orig::orig runs\n" }
sub repl { print "&Orig::repl runs (O No!)\n" }
1;
####
package Repl;
use warnings;
use strict;
BEGIN {
use Orig;
use Exporter;
use vars qw( @ISA @EXPORT);
@ISA = qq(Exporter);
for ( @Orig::EXPORT) {
no strict 'refs';
*{$_} = \&{"Orig::". $_};
}
@EXPORT = ( qw( repl ), @Orig::EXPORT );
}
no warnings 'redefine';
sub repl { print "&Repl::repl runs $/" }
1;
####
#!/usr/bin/perl
# client program
use warnings;
use strict;
use Repl;
repl();
orig();
####
&Repl::repl runs
&Orig::orig runs