Evaluate given string trace request.

    Usage::

        Umbra -t "{'umbra.engine' : ('.*', 0), 'umbra.preferences' : (r'.*', 0)}"
        Umbra -t "['umbra.engine', 'umbra.preferences']"
        Umbra -t "'umbra.engine, umbra.preferences"

    :param data: Trace request.
    :type data: unicode
    :param tracer: Tracer.
    :type tracer: object
    :return: Definition success.
    :rtype: bool

def evaluate_trace_request(data, tracer=tracer):
    """
    Evaluate given string trace request.

    Usage::

        Umbra -t "{'umbra.engine' : ('.*', 0), 'umbra.preferences' : (r'.*', 0)}"
        Umbra -t "['umbra.engine', 'umbra.preferences']"
        Umbra -t "'umbra.engine, umbra.preferences"

    :param data: Trace request.
    :type data: unicode
    :param tracer: Tracer.
    :type tracer: object
    :return: Definition success.
    :rtype: bool
    """

    data = ast.literal_eval(data)

    if isinstance(data, str):
        modules = dict.fromkeys(map(lambda x: x.strip(), data.split(",")), (None, None))
    elif isinstance(data, list):
        modules = dict.fromkeys(data, (None, None))
    elif isinstance(data, dict):
        modules = data

    for module, (pattern, flags) in modules.iteritems():
        __import__(module)
        pattern = pattern if pattern is not None else r".*"
        flags = flags if flags is not None else re.IGNORECASE
        trace_module(sys.modules[module], tracer, pattern, flags)
    return True