Security Advisories (3)
CVE-2017-0373 (2017-05-10)

The gen_class_pod implementation in lib/Config/Model/Utils/GenClassPod.pm in Config-Model (aka libconfig-model-perl) before 2.102 has a dangerous "use lib" line, which allows remote attackers to have an unspecified impact via a crafted Debian package file.

CPANSA-Config-Model-2017-01 (2017-05-10)

YAML or YAML::XS can be loaded automatically making it possible to run arbitrary code loading a specially crafted YAML file.

CVE-2017-0374 (2017-05-10)

Loads models from a local directory, making it possible to substitute the model.

NAME

Config::Model::Backend::Debian::DpkgSyntax - Role to read and write files with Dpkg syntax

VERSION

version 1.211

SYNOPSIS

# in Dpkg dedicated backend class

DESCRIPTION

This module is a Moose role to add capacity to read and write dpkg control files to Config::Model backend classes.

parse_dpkg_file ( file_handle )

Read a control file from the file_handle and returns a nested list (or a list ref) containing data from the file.

The returned list is of the form :

[
  # section 1
  [ keyword1 => value1, # for text or simple values
    keyword2 => value2, # etc 
  ],
  # section 2
  [ ... ]
  # etc ...
]

write_dpkg_file ( io_handle, list_ref, list_sep )

Munge the passed list ref into a string compatible with control files and write it in the passed file handle.

The input is a list of list in a form similar to the one generated by parse_dpkg_file:

[ section [ keyword => value | value_list ] ]

Except that the value may be a SCALAR or a list ref. In case, of a list ref, the list items will be joined with the value list_sep before being written.

For instance the following code :

my $ref = [ [ Foo => 'foo value' , Bar => [ qw/v1 v2/ ] ];
write_dpkg_file ( $ioh, $ref, ', ' )

will yield:

Foo: foo value
Bar: v1, v2

AUTHOR

Dominique Dumont, (ddumont at cpan dot org)

SEE ALSO

Config::Model, Config::Model::AutoRead, Config::Model::Backend::Any,