| 1 | package HTTP::AppServer::Plugin; | ||
| 2 | # Abstract class for all HTTP::AppServer plugins. | ||
| 3 | # 2010 by Tom Kirchner | ||
| 4 | |||
| 5 | use 5.010000; | ||
| 6 | use strict; | ||
| 7 | use warnings; | ||
| 8 | |||
| 9 | our $VERSION = '0.01'; | ||
| 10 | |||
| 11 | # called by the server when the plugin is installed | ||
| 12 | # to determine which routes are handled by the plugin | ||
| 13 | sub init | ||
| 14 | { | ||
| 15 | my ($class, # the class name | ||
| 16 | $server, # the server instance (not started yet) | ||
| 17 | %options # config options for the plugin set by the user | ||
| 18 | ) = @_; | ||
| 19 | |||
| 20 | return ( | ||
| 21 | # <route> => <coderef> | ||
| 22 | ); | ||
| 23 | } | ||
| 24 | |||
| 25 | 1; | ||
| 26 | __END__ |