windows - How can I configure Module::Build to NOT install files as read-only? -
i've encountered scenario i'm building perl module part of build system on windows machine. use --install_base
option of module::build specify temporary directory put module files until overall build system can use them. unfortunately, other build system has problem if of files depends on read - tries delete generated files before rebuilding them, , can't clean read-only files (it tries delete it, , it's read only, gives error.) default, module::build
installs libraries read-only bit enabled.
one option make new step in build process removes read-only bit installed files, due nature of build tool require second temporary directory...ugh.
is possible configure module::build
based installer not enable read-only bit when files installed --install_base directory? if so, how?
no, it's not configurable option. it's done in copy_if_modified
method in module::build::base
:
# mode read-only + (executable if source executable) $mode = oct(444) | ( $self->is_executable($file) ? oct(111) : 0 ); chmod( $mode, $to_path );
if controlled build.pl, subclass module::build
, override copy_if_modified
call base class , chmod
file writable. impression you're trying install else's module.
probably easiest thing install copy of module::build
in private directory, edit use oct(666)
(or whatever mode want). invoke perl -i /path/to/customized/module/build build.pl
. or, (as said) use standard module::build
, add separate step mark writable afterwards.
update: ysth right; it's extutils::install final copy. copy_if_modified
populating blib
. extutils::install hardcodes mode read-only. use customized version of extutils::install, it's easier have separate step.
Comments
Post a Comment