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::Exception - Exception mechanism for configuration model

SYNOPSIS

# in module
Config::Model::Exception::Model->throw
    (
      object => $self,
      error => "Oops in model"
    ) if $fail ;

# in application
eval { function_that_may_fail() ;}
if ($@) {
   my $exception = shift;
   warn $ex->error ;
   # fix failure
}

DESCRIPTION

You must read Exception::Class before reading on.

This module creates all the exception class used by Config::Model.

All expection class name begins with Config::Model::Exception::

The exception classes are:

Any

Base class. It accepts an object argument. The user must pass the reference of the object where the exception occured. The object name (or xpath) will be used to generate the error message.

TODO: list all exception classes and hierarchy. 

How to get trace

By default, most of the exceptions will not print out the stack trace. For debug purpose, you can force a strack trace.

For instance, if you want a stack trace for an "unknown element" error, you must add this line in your script:

Config::Model::Exception::UnknownElement->Trace(1) ;

If you're not sure which class to trace, add this line in your script:

Config::Model::Exception::Any->Trace(1) ;

AUTHOR

Dominique Dumont, (ddumont at cpan dot org)

SEE ALSO

Config::Model, Config::Model::Instance, Config::Model::Node, Config::Model::Value Exception::Class