1Data::Printer::Config(3U)ser Contributed Perl DocumentatiDoanta::Printer::Config(3)
2
3
4

NAME

6       Data::Printer::Config - Load run-control (.dataprinter) files for
7       Data::Printer
8

DESCRIPTION

10       This module is used internally to load ".dataprinter" files.
11

THE RC FILE

13           # line comments are ok with "#" or ";"
14           ; this is also a full line comment.
15           ; Comments at the end of a line (inline) are not allowed
16           multiline  = 0
17           hash_max   = 5
18           array_max  = 5
19           string_max = 50
20           # use quotes if you need spaces to be significant:
21           hash_separator = " => "
22           class.show_methods = none
23           class.internals    = 0
24           filters = DB, Web
25
26           # if you tag a class, those settings will override your basic ones
27           # whenever you call p() inside that class.
28           [MyApp::Some::Class]
29           multiline = 1
30           show_tainted: 1
31           class.format_inheritance = lines
32           filters = MyAwesomeDebugFilter
33
34           [Other::Class]
35           theme = Monokai
36
37           ; use "begin filter NAME" and "end filter" to add custom filter code.
38           ; it will expose $obj (the data structure to be parsed) and $ddp
39           ; (data printer's object). YOU MAY ONLY DO THIS IF YOUR FILE IS ONLY
40           ; READABLE AND WRITEABLE BY THE USER (i.e. chmod 0600).
41           begin filter HTTP::Request
42               return $ddp->maybe_colorize($obj->method . ' ' . $obj->uri, 'string')
43                    . $obj->decoded_content;
44           end filter
45

PUBLIC INTERFACE

47       This module is not meant for public use. However, because Data::Printer
48       changed the format of the configuration file, we provide the following
49       public function for people to use:
50
51   convert( $filename )
52           perl -MDDP -E 'say Data::Printer::Config::convert( q(/path/to/my/.dataprinter) )'
53
54       Loads a deprecated (pre-1.0) configuration file and returns a string
55       with a (hopefully) converted version, which you can use for newer
56       (post-1.0) versions.
57
58       Other public functions, not really meant for general consumption, are:
59
60       •   "load_rc_file( $filename )" - loads a configuration file and
61           returns the associated data structure. If no filename is provided,
62           looks for ".dataprinter".
63

SEE ALSO

65       Data::Printer
66
67
68
69perl v5.34.0                      2021-07-22          Data::Printer::Config(3)
Impressum