Modularize Display.pm
Summary
When someone writes an authentication plugin, if login template isn't available, he has to modify Display.pm and login.tpl. This is due to monolithic template generation.
Design proposition
Template generation will be done in 2 steps:
- HTML::Template loads login.tpl which contains a
<!-- LEMON -->
tag -
Display.pm calls
auth->template
. If result is:-
a string (template name), it replaces
<!-- LEMON -->
tag by the result ofHTML::Template->new('tpl_name.tpl')
and prints the result -
a sub, it replaces
<!-- LEMON -->
tag by the result of this sub (to be used by Auth::Choice)
-
a string (template name), it replaces
This design can be used also in #1471.