1YAML::PP::Ref(3) User Contributed Perl Documentation YAML::PP::Ref(3)
2
3
4
6 YAML::PP::Ref - Generated Reference Parser backend for YAML::PP
7
9 my $ypp = YAML::PP::Ref->new;
10
11 my $data = $ypp->load_string($yaml);
12
13 my $data = $ypp->load_file($file);
14
15 open my $fh, '<:encoding(UTF-8)', $file or die $!;
16 my $data = $ypp->load_file($fh);
17 close $fh;
18
20 The <https://yaml.org/> YAML Specification can be used to generate a
21 YAML Parser from it.
22
23 Ingy has done that for several languages, and the one for Perl can be
24 found here: <https://metacpan.org/dist/YAML-Parser>.
25
26 This module exchanges the default YAML::PP::Parser parsing backend with
27 YAML::Parser. So you can profit from a Parser 100% compliant to the
28 spec, but YAML::PP's functionalities on top of that, like loading the
29 parsing events into a data structure, and using the various YAML::PP
30 plugins.
31
32 At the time of this release, it is quite slow compared to other Perl
33 YAML modules, but it might not make a difference for you depending on
34 your application. The grammar for YAML 1.2 is not optimized for speed.
35
36 Also the error messages are not really helpful currently.
37
38 Check out the documentation of YAML::Parser regularly, these things
39 might have changed meanwhile.
40
42 Copyright 2021 by Tina Müller
43
44 This library is free software and may be distributed under the same
45 terms as perl itself.
46
47
48
49perl v5.36.0 2022-07-22 YAML::PP::Ref(3)