summaryrefslogtreecommitdiff
path: root/lib/YAML/Loader/Base.pm
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2015-04-18 15:03:28 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2015-04-18 15:03:28 +0000
commit2fe5b8de1e9d06482aa76303e7342bc6605700ea (patch)
treecccc47c409970b2db7a8f64f6c25e993270ddf9b /lib/YAML/Loader/Base.pm
downloadYAML-tarball-master.tar.gz
Diffstat (limited to 'lib/YAML/Loader/Base.pm')
-rw-r--r--lib/YAML/Loader/Base.pm33
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/YAML/Loader/Base.pm b/lib/YAML/Loader/Base.pm
new file mode 100644
index 0000000..6a3504c
--- /dev/null
+++ b/lib/YAML/Loader/Base.pm
@@ -0,0 +1,33 @@
+package YAML::Loader::Base;
+
+use YAML::Mo;
+
+has load_code => default => sub {0};
+has stream => default => sub {''};
+has document => default => sub {0};
+has line => default => sub {0};
+has documents => default => sub {[]};
+has lines => default => sub {[]};
+has eos => default => sub {0};
+has done => default => sub {0};
+has anchor2node => default => sub {{}};
+has level => default => sub {0};
+has offset => default => sub {[]};
+has preface => default => sub {''};
+has content => default => sub {''};
+has indent => default => sub {0};
+has major_version => default => sub {0};
+has minor_version => default => sub {0};
+has inline => default => sub {''};
+
+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;