andk / cpanpm

CPAN.pm
87 stars 79 forks source link

Add support for YAML::PP(::LibYAML) #134

Open perlpunk opened 4 years ago

perlpunk commented 4 years ago

It will load only objects with the specified classes. Note that load_file/dump_file work for filehandles too.

Also enable $LoadBlessed for YAML::XS/Syck/.pm because they were set to false by default.

For demo I added

    # only for testing
 #    $yaml_module = 'YAML::PP';
 #    $yaml_module = 'YAML::PP::LibYAML';

in _yaml_module.

perlpunk commented 4 years ago

Maybe it should be configurable if loading objects should be enabled or not, similar to yaml_load_code.