1Data::Printer::Filter::UWseebr(3C)ontributed Perl DocumeDnattaat:i:oPnrinter::Filter::Web(3)
2
3
4

NAME

6       Data::Printer::Filter::Web - pretty-printing of
7       HTTP/JSON/LWP/Plack/Dancer/Catalyst/Mojo...
8

SYNOPSIS

10       In your ".dataprinter" file:
11
12           filters = Web
13
14       You may also customize the look and feel with the following options
15       (defaults shown):
16
17           filter_web.show_class_name          = 0
18           filter_web.expand_headers           = 1
19           filter_web.show_redirect            = 1
20           filter_web.show_request_in_response = 0
21
22           # you can even customize your themes:
23           colors.filter_web_json_true         = #ccffcc
24           colors.filter_web_json_false        = #ffcccc
25           colors.filter_web_cookie            = #0b3e21
26           colors.filter_web_method            = #fefe33
27           colors.filter_web_uri               = $fefe88
28           colors.filter_web_response_success  = #fefe33
29           colors.filter_web_response_info     = #fefe33
30           colors.filter_web_response_redirect = #fefe33
31           colors.filter_web_response_error    = #fefe33
32

DESCRIPTION

34       This is a filter plugin for Data::Printer. It filters through several
35       web-related objects and display their content in a (hopefully!) more
36       userful way than a regular dump.
37

PARSED MODULES

39   JSON
40       Because Perl has no "true" or "false" tokens, many JSON parsers
41       implement boolean objects to represent those. With this filter, you'll
42       get "true" and "false" (which is what probably you want to see) instead
43       of an object dump on those booleans. This module filters through the
44       following modules:
45
46       "JSON::PP", "JSON::XS", "JSON", "JSON::MaybeXS", "Cpanel::JSON::XS",
47       "JSON", "JSON::SL", "Pegex::JSON", "JSON::Tiny", "JSON::Any",
48       "JSON::DWIW" and "Mojo::JSON".
49
50       Also, if you use "JSON::Typist" to parse your JSON strings, a
51       Data::Printer dump using this filter will always properly print numbers
52       as numbers and strings as strings.
53
54   COOKIES
55       This filter is able to handle cookies from "Dancer"/"Dancer2" and
56       "Mojolicious" frameworks. Other frameworks like "Catalyst" rely on
57       "HTTP::CookieJar" and "HTTP::Cookies", which simply store them in a
58       hash, not an object.
59
60   HTTP REQUEST/RESPONSE
61       "HTTP::Request" and "HTTP::Response" objects are filtered to display
62       headers and content. These are returned by LWP::UserAgent,
63       WWW::Mechanize and many others.
64
65       If the response comes from chained redirects (that the source
66       HTTP::Response object knows about), this filter will show you the
67       entire redirect chain above the actual object. You may disable this by
68       changing the "filter_web.show_redirect" option.
69

SEE ALSO

71       Data::Printer
72
73
74
75perl v5.38.0                      2023-07-31     Data::Printer::Filter::Web(3)
Impressum