GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
OpenXPKI::Template(3) User Contributed Perl Documentation OpenXPKI::Template(3)

This wraps around the process method of the original Template class. It expects the parameter string as first argument (scalar, not reference!) and a hashref with the params for template. The class tries to auto-deserialize parameters from the params array by evaluating the template string for sequences like context.upper.lower (this is yet done for the context prefix only). The result is returned as a string, if processing fails, an OpenXPKI::Exception is thrown.

Expects a filename instead of a template string as first argument and uses the content of this file as template string. The second parameter is passed unmodified to render as template arguments.

Return undef if the file can not be read or is empty.

Expects the template to be a shortcut pattern, starting with the dollar sign followed by the key name and an optional subkey, separated by a dot. Allowed charaters are word characters and the dash.

To support lean shortcuts from e.g. the context, the second argument can be a subroutine reference that returns the value for a given key instead of a hash ref.

Will die if the given template is not a shortcut.

Will return non-scalar values if the requested key is not a scalar!

Examples

$foo
return $params->{foo}
$foo.bar
return $params->{foo}->{bar}

will die if $params->{foo} is not a hash reference.

$foo.0
$params->{foo}->[0] if $params->{foo} is an array ref. $params->{foo}->{0} if $params->{foo} is a hash ref.

will die if $params->{foo} is not a hash/array reference.

2025-07-15 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.