edittemplate: only generate a UUID on-demand
If the template doesn't use <TMPL_VAR UUID> there's no point in incurring any cost.master
parent
7aa10a2952
commit
4a11dc4d16
|
@ -139,13 +139,15 @@ sub filltemplate ($$) {
|
||||||
|
|
||||||
$template->param(name => $page);
|
$template->param(name => $page);
|
||||||
|
|
||||||
eval {
|
if ($template->query(name => 'uuid')) {
|
||||||
require UUID::Tiny;
|
eval {
|
||||||
UUID::Tiny->import(':std');
|
require UUID::Tiny;
|
||||||
my $uuid;
|
UUID::Tiny->import(':std');
|
||||||
$uuid = create_uuid_as_string(UUID_V4());
|
my $uuid;
|
||||||
$template->param(uuid => $uuid);
|
$uuid = create_uuid_as_string(UUID_V4());
|
||||||
};
|
$template->param(uuid => $uuid);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
return $template->output;
|
return $template->output;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue