[% FILTER html %]
my $service = Template::Service->new({
CONTEXTS => {
splash => 'Template::Splash::Context',
blah => 'stash, view, perl',
yada => {
FACILITIES => 'stash, view, perl, plugins',
ACQUIRE_DEFAULT => 'service',
ACQUIRE_CONTEXT => 'view',
ACQUIRE_REQUEST => 'stash',
},
same => {
FACILITIES => 'stash, view, perl, plugins',
ACQUIRE => {
DEFAULT => 'service',
CONTEXT => 'view',
REQUEST => 'stash',
}
},
simple => {
FACILITIES => 'stash, view, perl, plugins',
ACQUIRE => 'context',
},
complex => {
FACILITIES => {
ACQUIRE => 'service', # default acquire point
stash => {
MODULE => 'Template::Stash', # require it
ARGS => [ 10, 20 ],
ACQUIRE => 'request',
},
view => {
CLASS => 'Template::View', # don't require it
ARGS => { ... },
}
}
}
prefab => {
MODULE => 'My::Own::Object',
FACILITIES => {
ACQUIRE => 'service', # default acquire point
stash => $stash, # object ref
view => {
OBJECT => $view,
ACQUIRE => 'request',
}
}
}