是否可以重新定义_function_used_by_exported_function
only 中的exported_function
调用second_routine
?
#!/usr/bin/env perl
use warnings;
use strict;
use Needed::Module qw(exported_function);
sub first_routine {
return exported_function( 2 );
}
no warnings 'redefine';
sub Needed::Module::_function_used_by_exported_function {
return 'B';
}
sub second_routine {
return exported_function( 5 );
}
say first_routine();
say second_routine();