| 1 | package Clustericious::Coder::YAML; | ||
| 2 | |||
| 3 | 46 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 46 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 46 | ▶ | use YAML::XS (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 46 | ▶ | use 5.010; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | # ABSTRACT: YAML encoder for AutodataHandler | ||
| 9 | 46 | our $VERSION = '1.29'; # VERSION | |
| 10 | |||
| 11 | sub coder | ||
| 12 | 100 | ▶ | { |
|
Subroutine
coder: called CC=1 SCAR=1.2
Pod
undocumented
| |||
| 13 | my %coder = ( | ||
| 14 | type => 'text/x-yaml', | ||
| 15 | format => 'yml', | ||
| 16 | 0 | ▶ | encode => sub { YAML::XS::Dump($_[0]) }, |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 17 | 0 | ▶ | decode => sub { YAML::XS::Load($_[0]) }, |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 18 | 100 | ); | |
| 19 | |||
| 20 | 100 | \%coder; | |
| 21 | } | ||
| 22 | |||
| 23 | 46 | 1; | |
| 24 | |||
| 25 | __END__ | ||