GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Data::Printer::Filter::Web(3) User Contributed Perl Documentation Data::Printer::Filter::Web(3)

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

In your ".dataprinter" file:

    filters = Web

You may also customize the look and feel with the following options (defaults shown):

    filter_web.show_class_name          = 0
    filter_web.expand_headers           = 1
    filter_web.show_redirect            = 1
    filter_web.show_request_in_response = 0

    # you can even customize your themes:
    colors.filter_web_json_true         = #ccffcc
    colors.filter_web_json_false        = #ffcccc
    colors.filter_web_cookie            = #0b3e21
    colors.filter_web_method            = #fefe33
    colors.filter_web_uri               = $fefe88
    colors.filter_web_response_success  = #fefe33
    colors.filter_web_response_info     = #fefe33
    colors.filter_web_response_redirect = #fefe33
    colors.filter_web_response_error    = #fefe33

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

Because Perl has no "true" or "false" tokens, many JSON parsers implement boolean objects to represent those. With this filter, you'll get "true" and "false" (which is what probably you want to see) instead of an object dump on those booleans. This module filters through the following modules:

"JSON::PP", "JSON::XS", "JSON", "JSON::MaybeXS", "Cpanel::JSON::XS", "JSON", "JSON::SL", "Pegex::JSON", "JSON::Tiny", "JSON::Any", "JSON::DWIW" and "Mojo::JSON".

Also, if you use "JSON::Typist" to parse your JSON strings, a Data::Printer dump using this filter will always properly print numbers as numbers and strings as strings.

This filter is able to handle cookies from "Dancer"/"Dancer2" and "Mojolicious" frameworks. Other frameworks like "Catalyst" rely on "HTTP::CookieJar" and "HTTP::Cookies", which simply store them in a hash, not an object.

"HTTP::Request" and "HTTP::Response" objects are filtered to display headers and content. These are returned by LWP::UserAgent, WWW::Mechanize and many others.

If the response comes from chained redirects (that the source HTTP::Response object knows about), this filter will show you the entire redirect chain above the actual object. You may disable this by changing the "filter_web.show_redirect" option.

Data::Printer
2021-02-19 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.