The ./site-generator should fail to run if all the perl modules needed are not installed #164

Open
opened 2023-08-31 16:57:58 +00:00 by ken_fallon · 1 comment
Collaborator

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.
Collaborator

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.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: rho_n/hpr_generator#164
No description provided.