| Jifty documentation | Contained in the Jifty distribution. |
Jifty::YAML -- Wrapper around YAML
Provides a wrapper around the YAML library. If the faster YAML::Syck is available, then it's used instead.
Each of the above is alias to the equivalent function in either YAML or YAML::Syck.
| Jifty documentation | Contained in the Jifty distribution. |
use warnings; use strict; package Jifty::YAML;
BEGIN { local $@; no strict 'refs'; no warnings 'once'; if ( eval { require YAML::Syck; YAML::Syck->VERSION(0.71) } ) { *Load = *YAML::Syck::Load; require YAML; # Use YAML::Dump for the moment since YAML.pm segfaults on # reading stupidly long (~20K characters) double-quoted # strings, and we need to produce YAML.pm-readable output. *Dump = *YAML::Dump; #*Dump = *YAML::Syck::Dump; *LoadFile = *YAML::Syck::LoadFile; *DumpFile = *YAML::Syck::DumpFile; } else { require YAML; *Load = *YAML::Load; *Dump = *YAML::Dump; *LoadFile = *YAML::LoadFile; *DumpFile = *YAML::DumpFile; } } 1;