1YAML::Any(3) User Contributed Perl Documentation YAML::Any(3)
2
3
4
6 YAML::Any - Pick a YAML implementation and use it.
7
9 use YAML::Any;
10 $YAML::Indent = 3;
11 my $yaml = Dump(@objects);
12
14 There are several YAML implementations that support the Dump/Load API.
15 This module selects the best one available and uses it.
16
18 Currently, YAML::Any will choose the first one of these YAML
19 implementations that is installed on your system:
20
21 YAML::XS
22 YAML::Syck
23 YAML::Old
24 YAML
25 YAML::Tiny
26
28 If you specify an option like:
29
30 $YAML::Indent = 4;
31
32 And YAML::Any is using YAML::XS, it will use the proper variable:
33 $YAML::XS::Indent.
34
36 Like all the YAML modules that YAML::Any uses, the following
37 subroutines are exported by default:
38
39 Dump
40 Load
41
42 and the following subroutines are exportable by request:
43
44 DumpFile
45 LoadFile
46
48 YAML::Any provides the following class methods.
49
50 YAML::Any->order;
51 This method returns a list of the current possible implementations
52 that YAML::Any will search for.
53
54 YAML::Any->implementation;
55 This method returns the implementation the YAML::Any will use. This
56 result is obtained by finding the first member of YAML::Any->order
57 that is either already loaded in %INC or that can be loaded using
58 "require". If no implementation is found, an error will be thrown.
59
61 Ingy dA~Xt Net <ingy@cpan.org>
62
64 Copyright (c) 2008. Ingy dA~Xt Net.
65
66 This program is free software; you can redistribute it and/or modify it
67 under the same terms as Perl itself.
68
69 See <http://www.perl.com/perl/misc/Artistic.html>
70
71
72
73perl v5.10.1 2009-08-10 YAML::Any(3)