| 1 | # | ||
| 2 | # This file is part of Dancer-Plugin-Params-Normalization | ||
| 3 | # | ||
| 4 | # This software is copyright (c) 2011 by Damien "dams" Krotkine. | ||
| 5 | # | ||
| 6 | # This is free software; you can redistribute it and/or modify it under | ||
| 7 | # the same terms as the Perl 5 programming language system itself. | ||
| 8 | # | ||
| 9 | package Dancer::Plugin::Params::Normalization::Abstract; | ||
| 10 | { | ||
| 11 | 5 | $Dancer::Plugin::Params::Normalization::Abstract::VERSION = '0.52'; | |
| 12 | } | ||
| 13 | 5 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | 5 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | |||
| 16 | # ABSTRACT: class for custom parameters normalization | ||
| 17 | |||
| 18 | 5 | ▶ | use base 'Dancer::Engine'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | |||
| 20 | # args: ($class) | ||
| 21 | # Overload this method in your normalization class if you have some init stuff to do, | ||
| 22 | # such as a database connection or making sure a directory exists... | ||
| 23 | # sub init { return 1; } | ||
| 24 | |||
| 25 | # args: ($self, $hashref) | ||
| 26 | # receives a hashref of parameters names/values. It should return a hashrefs of | ||
| 27 | # the normalized (modified) parameters. | ||
| 28 | 0 | ▶ | sub normalize { |
|
Subroutine
normalize: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 29 | 0 | die "retrieve not implemented"; | |
| 30 | } | ||
| 31 | |||
| 32 | # Methods below this this line should not be overloaded. | ||
| 33 | |||
| 34 | # The constructor is inherited from Dancer::Engine, itself inherited from Dancer::Object. | ||
| 35 | |||
| 36 | 5 | 1; | |
| 37 | |||
| 38 | __END__ | ||