PerlDancer / Dancer

The easiest way to write web applications with Perl (Perl web micro-framework)
http://perldancer.org/
740 stars 211 forks source link

Restore old load_settings_from_yaml() calling convention. #1198

Closed snakpak closed 5 years ago

snakpak commented 5 years ago

(Rebased and continued from #1190.) Since c6b870c, this call requires an additional $module parameter. This patch makes that argument optional and falls back to the old behavior if missing.

And the reason for doing this is to (still) be able to overlay multiple config files without having to either hardcode the YAML preference or ferret out the current setting beforehand in userland.

So really, this is a bug fix for the bug fixed in PR #1164.

bigpresh commented 5 years ago

Sorry I'd missed the other PR until now! This, on first glance, looks good and sensible, thanks!

I will review it in a bit more detail later, but I don't see a reason that it shouldn't be safe (there's plenty of tests which would fail if it wasn't), and I can see that it would be useful.