Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Staging Module for Next Generation YAML.pm
Perl
branch: master

This branch is even with ingydotnet:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
t
Changes
Makefile.PL
README
ToDo

README

NAME
    YAML2 - YAML Ain't Markup Language

WARNING
    This is a very early version, and should simply not be used.

NOTE
    The module "YAML2" is intended to soon become the new YAML.pm. It is a
    frontend API module that does no real work on its own, but instead loads
    the YAML module you want to use. I'm releasing it to CPAN, so people can
    start playing with the new API but not upset their production/important
    code.

    When YAML2 becomes YAML, the classic YAML.pm will be renamed to
    YAML::Old. You can get the exact same behavior with:

        use YAML-Old;

    for now, you can try:

        use YAML2-Old;

    If you use YAML2 now, when it becomes YAML.pm the only thing you will
    need to do is change 'YAML2' to 'YAML' in the 'use YAML' line of your
    code. In other words, when I make the "switch", all I will do is
    "s/YAML2/YAML/g" and remove this NOTE section from the documentation.

SYNOPSIS
        use YAML2;              # Use the best YAML implementation available
        use YAML2-XS;           # Use only YAML::XS, but with standard YAML2 API
        use YAML2-XS,-Perl;     # Use either YAML::XS or YAML::Perl

        my $y = yaml;           # Create a new YAML object. Same as:
        my $y = YAML->new->implementation('YAML::XS');

        $YAML::UseCode = 1;     # Old global flags still work, but consistently
                                # between implementations
        Dump Load $object;      # Old Dump Load interface still exists

        yaml->dump($object);    # New dump interface
        yaml->load($yaml);      # New load interface
        yaml->indent(4)         # Dump to a file with various options
            ->file('foo.yaml')
            ->use_code
            ->dump(@objects);

DESCRIPTION
    YAML2.pm is the front end module API module for all of the various
    backend YAML implementation modules. The current YAML implementation
    modules are:

        - YAML::Old - The old, "classic", woefully inadequate YAML.pm
        - YAML::XS - The newer very fast and very correct YAML module
        - YAML::Syck - The older very fast but less correct YAML module
        - YAML::Perl - The Perl port of PyYaml
        - YAML::Tiny - Adam's Tiny subset of YAML module

    All of these implementation modules use the familiar Dump/Load API.
    YAML2 continues to support this simple API, but also exposes newer, more
    powerful APIs. Note that not all of the API options can be used with
    every implementation module. YAML2 will attempt to let you know when you
    are doing something that is not supported.

    When you "use" YAML2, you can let it choose an appropriate YAML
    implementation, or you can specify which one(s) should be used. YAML2
    will load the appropriate implemenation module or it will die with the
    appropriate error msg.

        use YAML2-XS;       # Use only the YAML::XS implementation
        use YAML2-XS,-Perl; # Use either YAML::XS implementation
        use YAML;           # Same as:
        use YAML-XS,-Perl,-Syck,-Old,-Tiny;

EXPORT BEHAVIOR
Dump/Load API
AUTHOR
    Ingy döt Net <ingy@cpan.org>

COPYRIGHT
    Copyright (c) 2008. Ingy döt Net.

    This program is free software; you can redistribute it and/or modify it
    under the same terms as Perl itself.

    See http://www.perl.com/perl/misc/Artistic.html

Something went wrong with that request. Please try again.