Think about Loose Coupling | |
PerlMonks |
making 'use strict' default conflicts with CORE modules/scriptsby LanX (Saint) |
on Dec 12, 2014 at 19:21 UTC ( [id://1110202]=perlquestion: print w/replies, xml ) | Need Help?? |
LanX has asked for the wisdom of the Perl Monks concerning the following question:
A perlmongers friend of mine asked me how to avoid boilerplate when typing snippets interactively on the console... (... also bitching around that Modern::Perl isn't CORE and that there are no packages to install it, neither for Debian nor Win...) So I suggested to just configure PERL5OPT export PERL5OPT='-Mstrict' and so on for his other default stuff. Problem now is that perldoc (!!!) fails in that environment ... and I suppose there are more core-modules with similar problems (jeeeez ... o.O )
ok this could be solved with an extension to Modern::Perl checking for an exception list of old "unstrict" modules in the caller and including this extended modern module into PERL5OPT. After all this is only meant for the console.... Anyway I started to investigate /usr/bin/pod2man to isolate the problem and found the following code:
so all of this comes from dual code to allow the script to be run under perl and *sh equally. I'm puzzled, any good idea how to "strictify" this?
Cheers Rolf (addicted to the Perl Programming Language and ☆☆☆☆ :)
updatenot sure how pod2man is called but if $running_under_some_shell is a perl variable, it should be sufficient to fully qualify it like with $main::running_under_some_shell but I suppose it's rather a shell var...
Back to
Seekers of Perl Wisdom
|
|