| 1 | 6 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | 6 | ▶ | use 5.010; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | |||
| 4 | package FusqlFS::Formatter::Base; | ||
| 5 | 6 | ▶ | use FusqlFS::Version; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 6 | our $VERSION = $FusqlFS::Version::VERSION; | |
| 7 | |||
| 8 | =head1 NAME | ||
| 9 | |||
| 10 | FusqlFS::Formatter::Base - base formatter class | ||
| 11 | |||
| 12 | =head1 SYNOPSIS | ||
| 13 | |||
| 14 | package FusqlFS::Formatter::Native; | ||
| 15 | use parent 'FusqlFS::Formatter::Base'; | ||
| 16 | |||
| 17 | sub Dump | ||
| 18 | { | ||
| 19 | return $_[0]; | ||
| 20 | } | ||
| 21 | |||
| 22 | sub Load | ||
| 23 | { | ||
| 24 | return $_[0]; | ||
| 25 | } | ||
| 26 | |||
| 27 | =head1 DESCRIPTION | ||
| 28 | |||
| 29 | This is a base class for different built-in formatter classes used to dump and load | ||
| 30 | database data by different backends. | ||
| 31 | |||
| 32 | You can choose formatter with L<--format|fusqlfs/--format, -f> option by class name, | ||
| 33 | e.g. to choose L<FusqlFS::Formatter::Native> formatter use C<--format native> option. | ||
| 34 | |||
| 35 | =head1 METHODS | ||
| 36 | |||
| 37 | =over | ||
| 38 | |||
| 39 | =item Dump | ||
| 40 | |||
| 41 | Format input value into a string. | ||
| 42 | Abstract, should be implemented in child classes. | ||
| 43 | |||
| 44 | Input: $mixed_value | ||
| 45 | Output: $string | ||
| 46 | |||
| 47 | =item Load | ||
| 48 | |||
| 49 | Parse string value into original value. | ||
| 50 | Abstract, should be implemented in child classes. | ||
| 51 | |||
| 52 | Input: $string | ||
| 53 | Output: $mixed_value | ||
| 54 | |||
| 55 | =back | ||
| 56 | |||
| 57 | =cut | ||
| 58 | |||
| 59 | 0 | ▶ | sub Dump {} |
|
Subroutine
Dump: not called CC=1 SCAR=0.0
Pod
documented
| |||
| 60 | |||
| 61 | 0 | ▶ | sub Load {} |
|
Subroutine
Load: not called CC=1 SCAR=0.0
Pod
documented
| |||
| 62 | |||
| 63 | 6 | 1; | |