Files
zoneminder/scripts/ZoneMinder/t
nicandClaude Opus 5.5 090c318186 fix: zmupdate.pl no longer prints "Too late to run INIT block" from ConfigData (#8504)
ZoneMinder::Config has loaded ZoneMinder::ConfigData with a run-time
require since 24a75775d (refs #5547). ConfigData set itself up in an
INIT block, and Perl skips INIT blocks of code compiled after the INIT
phase, printing "Too late to run INIT block at .../ConfigData.pm line
72." zmupdate.pl reaches that through syncConfigFlags() at the end of
every upgrade, and through saveConfigToDB() with -f.

The options were still set up, because loadConfigData() calls
initialiseConfig() itself after the require, so only the warning goes.
ConfigData now calls initialiseConfig() at the end of the module, which
runs whether it is loaded with use or require. initialiseConfig() returns
early on a second call, so loadConfigData()'s call does nothing new.

config_lazy_load.t checks that loading ConfigData at run time prints
no INIT warning.

fixes #8503

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 18:34:40 -05:00
..