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
and accompanying badly named pragmaif (S_ISREG(PL_statbuf.st_mode) && cando(S_IRUSR,TRUE,&PL_statbuf) #if !defined(DOSISH) && !SvTRUE( get_sv("sx::y") && cando(S_IXUSR,TRUE,&PL_statbuf) #endif ) { xfound = tmpbuf; /* bingo! */ break; }
package sx::y; $sx::y = $VERSION = 0.01; 1;
when you recompile perl, use as perl -Msx::y -S foo
Untested, so not in patch form
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: Can I get a -S switch that doesn't care about the execute bit?
by DrWhy (Chaplain) on Aug 23, 2011 at 18:43 UTC |
In Section
Seekers of Perl Wisdom