diff options
Diffstat (limited to 'Master/tlpkg/tlperl0/lib/YAML/Loader/Base.pm')
-rwxr-xr-x | Master/tlpkg/tlperl0/lib/YAML/Loader/Base.pm | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/Master/tlpkg/tlperl0/lib/YAML/Loader/Base.pm b/Master/tlpkg/tlperl0/lib/YAML/Loader/Base.pm new file mode 100755 index 00000000000..6733ad6e313 --- /dev/null +++ b/Master/tlpkg/tlperl0/lib/YAML/Loader/Base.pm @@ -0,0 +1,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 |