logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Author

       Andy Wardley <http://wardley.org/>

Description

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

Methods

encode($data)
       Encodes $data to YAML.

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

   decode($data)
       Decodes $data from YAML.

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

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

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

Name

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

See Also

       Badger::Codecs, Badger::Codec, YAML

perl v5.36.0                                       2023-08-28                           Badger::Codec::YAML(3pm)

Synopsis

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

See Also