in reply to Exported subroutine redefine
You could use a wrapper around the main script
#!/usr/bin/perl use redefine; use File::Basename qw( dirname ); use File::Spec::Functions qw( rel2abs catfile ); do(catfile(dirname(rel2abs($0)), 'real_script.pl'));
Or use -M
perl -Mredefine script.pl
|
|---|