Currently the perl script fails to run at different points when run.
Some modules only give errors when their template is called.
The script should not run at all if all the perl modules are not installed.
Currently the perl script fails to run at different points when run.
Some modules only give errors when their template is called.
The script should not run at all if all the perl modules are not installed.
This is not simple as far as I can tell. I have looked at collecting the module names by scanning the site-generator script itself, then feeding it to a mini-script that performs module checks. My tests used Module::Runtime which gives a fairly clean interface to the module check process, but what if Module::Runtime is not installed?!
Also, it seems that there are modules that are referred to only in the templates (though they may be sub-modules of those that are defined in site-generator). This needs investigation.
I think it would be easiest to write a script in utils that can be run to perform the check, and that's what I'm working on at present.
This is not simple as far as I can tell. I have looked at collecting the module names by scanning the `site-generator` script itself, then feeding it to a mini-script that performs module checks. My tests used ` Module::Runtime` which gives a fairly clean interface to the module check process, but what if ` Module::Runtime` is not installed?!
Also, it seems that there are modules that are referred to only in the templates (though they may be sub-modules of those that are defined in `site-generator`). This needs investigation.
I think it would be easiest to write a script in `utils` that can be run to perform the check, and that's what I'm working on at present.
Would it be possible to create a "scanner" module that does nothing but try to reference all of the modules we use? Run that as a check up front and allow it to halt the rest of the script if anything is amiss?
Would it be possible to create a "scanner" module that does nothing but try to reference all of the modules we use? Run that as a check up front and allow it to halt the rest of the script if anything is amiss?
Would it be possible to create a "scanner" module that does nothing but try to reference all of the modules we use? Run that as a check up front and allow it to halt the rest of the script if anything is amiss?
Yes, that was what I was proposing. I think I had started writing something or had made some notes about how it might be done.
> Would it be possible to create a "scanner" module that does nothing but try to reference all of the modules we use? Run that as a check up front and allow it to halt the rest of the script if anything is amiss?
Yes, that was what I was proposing. I think I had started writing something or had made some notes about how it might be done.
A [check dependencies bash script](https://repo.anhonesthost.net/HPR/hpr_generator/pulls/203) is [merged into main](https://repo.anhonesthost.net/HPR/hpr_generator/commit/1853715a19ee747d2873816814a221e42ffcb5ac)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Currently the perl script fails to run at different points when run.
Some modules only give errors when their template is called.
The script should not run at all if all the perl modules are not installed.
This is not simple as far as I can tell. I have looked at collecting the module names by scanning the
site-generatorscript itself, then feeding it to a mini-script that performs module checks. My tests usedModule::Runtimewhich gives a fairly clean interface to the module check process, but what ifModule::Runtimeis not installed?!Also, it seems that there are modules that are referred to only in the templates (though they may be sub-modules of those that are defined in
site-generator). This needs investigation.I think it would be easiest to write a script in
utilsthat can be run to perform the check, and that's what I'm working on at present.Would it be possible to create a "scanner" module that does nothing but try to reference all of the modules we use? Run that as a check up front and allow it to halt the rest of the script if anything is amiss?
Yes, that was what I was proposing. I think I had started writing something or had made some notes about how it might be done.
A check dependencies bash script is merged into main