• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

garu/Data-Printer: colored pretty-print of Perl data structures and objects

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

garu/Data-Printer

开源软件地址:

https://github.com/garu/Data-Printer

开源编程语言:

Perl 100.0%

开源软件介绍:

Data::Printer

Build status Coverage Status CPAN version

Data::Printer is a Perl module to pretty-print Perl data structures and objects in full color, in a way that is properly formatted to be inspected by a human.

Basic Usage:

    my $data = get_some_data_from_somewhere();
    ...
    use DDP; p $data;  # <-- pretty-prints $data's content to STDERR

See Data::Printer in action

Main features:

  • Variable dumps designed for easy parsing by the human brain, not a machine;

  • Highly customizable, from indentation size to depth level. You can even rename the exported p() function!

  • Beautiful (and customizable) colors to highlight variable dumps and make issues stand-out quickly on your console. Comes bundled with several themes for you to pick.

  • Filters for specific data structures and objects to make debugging much, much easier. Includes filters for several popular classes from CPAN like JSON::*, URI, HTTP::*, LWP, Digest::*, DBI and DBIx::Class, printing what really matters to developers debugging code. It also lets you create your own custom filters easily.

  • Lets you inspect information that's otherwise difficult to find/debug in Perl 5, like circular references, reference counting (refcount), weak/read-only information, even estimated data size - all to help you spot issues with your data like leaks without having to know a lot about internal data structures or install heavy-weight tools like Devel::Gladiator.

  • keep your custom settings on a .dataprinter file that allows different options per module being analyzed! You may also create a custom profile class with your preferences and filters and upload it to CPAN.

  • output to many different targets like files, variables or open handles (defaults to STDERR). You can send your dumps to the screen or anywhere else, and customize this setting on a per-project or even per-module basis, like print everything from Some::Module to a debug.log file with extra info, and everything else to STDERR.

  • Easy to learn, easy to master. Seriously, what you already know cover about 90% of all use cases.

  • Works on Perl 5.8 and later Because you can't control where you debug, we try our best to be compatible with all versions of Perl 5.

  • Best of all? No non-core dependencies, Zero. Nada. so don't worry about adding extra weight to your project, as Data::Printer can be easily added/removed.

Please refer to Data::Printer's complete documentation for details on how to customize the output to your needs. Or (after installation) type:

perldoc Data::Printer

To view the complete docs on your terminal.

Installation

To install this module via cpanm:

> cpanm Data::Printer

Or, at the cpan shell:

cpan> install Data::Printer

If you wish to install it manually, download and unpack the tarball and run the following commands:

perl Makefile.PL
make
make test
make install

Of course, instead of downloading the tarball you may simply clone the git repository:

$ git clone git://github.com/garu/Data-Printer.git

Thank you for using Data::Printer! Please let me know of potential issues, bugs and wishlists :)

LICENSE AND COPYRIGHT

Copyright (C) 2011-2021 Breno G. de Oliveira

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap