Badger::Codec::YAML

NAME

Top Close Open

Badger::Codec::YAML - encode/decode data using YAML

SYNOPSIS

Top Close Open
use Badger::Codec::YAML;
my $codec   = Badger::Codec::YAML->new();
my $encoded = $codec->encode("Hello World");
my $decoded = $codec->decode($encoded);

DESCRIPTION

Top Close Open

This module implements a subclass of Badger::Codec which uses the YAML module to encode and decode data to and from YAML.

METHODS

Top Close Open

encode($data)

Top Close Open

Encodes $data to YAML.

$encoded = Badger::Codec::YAML->encode($data);

decode($data)

Top Close Open

Decodes $data from YAML.

$decoded = Badger::Codec::YAML->decode($encoded);

encoder()

Top Close Open

This method returns a reference to the real subroutine that's doing all the encoding work, i.e. the Dump() subroutine in YAML.

decoder()

Top Close Open

This method returns a reference to the real subroutine that's doing all the decoding work, i.e. the Load() subroutine in YAML.

AUTHOR

Top Close Open

Andy Wardley http://wardley.org/

COPYRIGHT

Top Close Open

Copyright (C) 2005-2009 Andy Wardley. All rights reserved.

Fork Me on Github