1Dancer::Engine(3)     User Contributed Perl Documentation    Dancer::Engine(3)
2
3
4

NAME

6       Dancer::Engine - base class for Dancer engines
7

VERSION

9       version 1.3512
10

SYNOPSIS

12           my $engine = Dancer::Engine->build( Serializer => 'JSON', $configuration );
13

DESCRIPTION

15       Dancer has various engines such Serializer engines, Template engines,
16       Logger engines and Session handlers engines. This is the base class for
17       all Dancer engines.
18
19       If you're writing an engine of a common type (such as those mentioned
20       above), you probably want to simply use their base class, which in turn
21       use Dancer::Engine. For example, Template engines inherit from
22       Dancer::Template::Abstract and Serializer engines inherit from
23       Dancer::Serializer::Abstract. Those Abstract base classes inherit from
24       Dancer::Engine.
25
26       If a new type of Dancer engine is created, it is best it inherits from
27       this class.
28

ATTRIBUTES

30   name
31       The name of the engine, such as JSON, or Simple.
32
33   type
34       The type of the engine, such as Serializer, or Session.
35

METHODS/SUBROUTINES

37   config
38       Fetches the configuration of the engine.
39
40           my $configuration = $engine->config;
41
42       You can only set the configuration at initialization time, not after.
43
44   build
45       Builds and returns the engine.
46
47           my $engine = Dancer::Engine->build( $type => $name, $config );
48

AUTHOR

50       Dancer Core Developers
51
53       This software is copyright (c) 2010 by Alexis Sukrieh.
54
55       This is free software; you can redistribute it and/or modify it under
56       the same terms as the Perl 5 programming language system itself.
57
58
59
60perl v5.30.0                      2019-07-26                 Dancer::Engine(3)
Impressum