1
  "   ˆl–äY>” TËm
q@µq¦n6ò˜´oÊƒh¹ÀÈ      MAJOR=4
MINOR=27
DEVNAME=tty27
     ˆ¾Êƒh¹ÀÈ      MAJOR=4
MINOR=42
DEVNAME=tty42
  F   ˆl–Ðz¾”ªeJ‚À½p.©‹FÿËƒ}æ__‹uÐb&=LV[(a–äY>” TËm
q@·pNÜi¥1hßË &o    package YAML::Syck;

# See documentation after the __END__ mark.

use strict;

our ( $Headless, $SingleQuote, $ImplicitBinary, $ImplicitTyping, $ImplicitUnicode, $UseCode, $LoadCode, $DumpCode, $DeparseObject );

use 5.006;
use Exporter;
use XSLoader ();

our $VERSION   = '1.32';
our @EXPORT    = qw( Dump Load DumpFile LoadFile );
our @EXPORT_OK = qw( DumpInto );
our @ISA       = qw( Exporter );

our $SortKeys    = 1;
our $LoadBlessed = 0;

XSLoader::load( 'YAML::Syck', $VERSION );

use constant QR_MAP => {
    ''   => sub { qr{$_[0]} },
    x    => sub { qr{$_[0]}x },
    i    => sub { qr{$_[0]}i },
    s    => sub { qr{$_[0]}s },
    m    => sub { qr{$_[0]}m },
    ix   => sub { qr{$_[0]}ix },
    sx   => sub { qr{$_[0]}sx },
    mx   => sub { qr{$_[0]}mx },
    si   => sub { qr{$_[0]}si },
    mi   => sub { qr{$_[0]}mi },
    ms   => sub { qr{$_[0]}sm },
    six  => sub { qr{$_[0]}six },
    mix  => sub { qr{$_[0]}mix },
    msx  => sub { qr{$_[0]}msx },
    msi  => sub { qr{$_[0]}msi },
    msix => sub { qr{$_[0]}msix },
};

sub __qr_helper {
    if ( $_[0] =~ /\A  \(\?  ([ixsm]*)  (?:-  (?:[ixsm]*))?  : (.*) \)  \z/x ) {
        my $sub = QR_MAP()->{$1} || QR_MAP()->{''};
        &$sub($2);
    }
    else {
        qr/$_[0]/;
    }
}

sub Dump {
    $#_
      ? join( '', map { YAML::Syck::DumpYAML($_) } @_ )
      : YAML::Syck::DumpYAML( $_[0] );
}

sub Load {
    if (wantarray) {
        my ($rv) = YAML::Syck::LoadYAML( $_[0] );
        @{$rv};
    }
    else {
        @_ = $_[0];
        goto &YAML::Syck::LoadYAML;
    }
}

sub _is_glob {
    my $h = shift;

    return 1 if ( ref($h) eq 'GLOB' );
    return 1 if ( ref( \$h ) eq 'GLOB' );
    return 1 if ( ref($h) =~ m/^IO::/ );

    return;
}

sub DumpFile {
    my $file = shift;
    if ( _is_glob($file) ) {
        for (@_) {
            my $err = YAML::Syck::DumpYAMLFile( $_, $file );
            if ($err) {
                $! = 0 + $err;
                die "Error writing to filehandle $file: $!\n";
            }
        }
    }
    else {
        open( my $fh, '>', $file ) or die "Cannot write to $file: $!";
        for (@_) {
            my $err = YAML::Syck::DumpYAMLFile( $_, $fh );
            if ($err) {
                $! = 0 + $err;
                die "Error writing to file $file: $!\n";
            }
        }
        close $fh
          or die "Error writing to file $file: $!\n";
    }
    return 1;
}

sub LoadFile {
    my $file = shift;
    if ( _is_glob($file) ) {
        Load(
            do { local $/; <$file> }
        );
    }
    else {
        if ( !-e $file || -z $file ) {
            die("'$file' is empty or non-existent");
        }
        open( my $fh, '<', $file ) or die "Cannot read from $file: $!";
        Load(
            do { local $/; <$fh> }
        );
    }
}

sub DumpInto {
    my $bufref = shift;
    ( ref $bufref ) or die "DumpInto not given reference to output buffer\n";
    YAML::Syck::DumpYAMLInto( $_, $bufref ) for @_;
    1;
}

1;

__END__
=pod

=head1 NAME 

YAML::Syck - Fast, lightweight YAML loader and dumper

=head1 SYNOPSIS

    use YAML::Syck;

    # Set this for interoperability with other YAML/Syck bindings:
    # e.g. Load('Yes') becomes 1 and Load('No') becomes ''.
    $YAML::Syck::ImplicitTyping = 1;

    $data = Load($yaml);
    $yaml = Dump($data);

    # $file can be an IO object, or a filename
    $data = LoadFile($file);
    DumpFile($file, $data);

    # A string with multiple YAML streams in it
    $yaml = Dump(@data);
    @data = Load($yaml);

    # Dumping into a pre-existing output buffer
    my $yaml;
    DumpInto(\$yaml, @data);

=head1 DESCRIPTION

This module provides a Perl interface to the B<libsyck> data serialization
library.  It exports the C<Dump> and C<Load> functions for converting
Perl data structures to YAML strings, and the other way around.

B<NOTE>: If yo