summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/YAML/Loader/Base.pm
blob: 6733ad6e3131516aba3bcaa4108b3782cd64d963 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package YAML::Loader::Base;

use strict;
use warnings;
use YAML::Base;

our $VERSION = '0.71';
our @ISA     = 'YAML::Base';

field load_code     => 0;
field stream        => '';
field document      => 0;
field line          => 0;
field documents     => [];
field lines         => [];
field eos           => 0;
field done          => 0;
field anchor2node   => {};
field level         => 0;
field offset        => [];
field preface       => '';
field content       => '';
field indent        => 0;
field major_version => 0;
field minor_version => 0;
field inline        => '';

sub set_global_options {
    my $self = shift;
    $self->load_code($YAML::LoadCode || $YAML::UseCode)
      if defined $YAML::LoadCode or defined $YAML::UseCode;
}

sub load {
    die 'load() not implemented in this class.';
}

1;

__END__

=head1 NAME

YAML::Loader::Base - Base class for YAML Loader classes

=head1 SYNOPSIS

    package YAML::Loader::Something;
    use YAML::Loader::Base -base;

=head1 DESCRIPTION

YAML::Loader::Base is a base class for creating YAML loader classes.

=head1 AUTHOR

Ingy döt Net <ingy@cpan.org>

=head1 COPYRIGHT

Copyright (c) 2006. Ingy döt Net. All rights reserved.

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

See L<http://www.perl.com/perl/misc/Artistic.html>

=cut