in reply to
Re^4: Can I get a -S switch that doesn't care about the execute bit?
in thread Can I get a -S switch that doesn't care about the execute bit?
It should be fairly trivial, simply locate the point where -x is tested, and add conditional (!SvTRUE( get_sv("sx::y"))
In file util.c in function Perl_find_script
&& !SvTRUE( get_sv("sx::y")
xfound = tmpbuf; /* bingo! */
and accompanying badly named pragma
$sx::y = $VERSION = 0.01;
when you recompile perl, use as perl -Msx::y -S foo
Untested, so not in patch form