If you specify an option like:
$YAML::Indent = 4;
Like all the YAML modules that YAML::Any uses, the following subroutines are exported by default:
and the following subroutines are exportable by request:
o Dump o Load
o DumpFile o LoadFile
YAML::Any provides the following class methods.
YAML::Any->order This method returns a list of the current possible implementations that YAML::Any will search for. YAML::Any->implementation This method returns the implementation the YAML::Any will use. This result is obtained by finding the first member of YAML::Any->order that is either already loaded in %INC or that can be loaded using require. If no implementation is found, an error will be thrown.
Here is an example for DumpFile:
When run, this creates a file called hello.yml in the current working directory, with the following contents.
--- array: - 5 - 6 - 100 string: Hello
In turn, the following LoadFile example, loads the contents from there and accesses them:
Assuming hello.yml exists, and is as created by the DumpFile example, it prints:
$ perl load.pl String == Hello $
Ingy doet Net
Copyright 2001-2014. Ingy doet Net
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
|perl v5.20.3||YAML::ANY (3)||2015-01-17|