hkoba / yatt_lite

YATT::Lite - Template with "use strict"
Other
5 stars 0 forks source link

Add `permissive_require()` and use it for delayed loading of other CPAN modules #200

Closed hkoba closed 3 years ago

hkoba commented 3 years ago

YATT::Lite sets $SIG{__DIE__} and $SIG{__WARN__} during call of YATT::Lite::WebMVC0::DirApp->handle() to provide better error diagnoses for template programmers. Unfortunately, this feature can interfere badly with other CPAN modules when they have codes like eval {require MaybeMissingModule}. So, let's add a better wrapper for require() to load CPAN modules without worrying about their use of eval {...}.