Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

data::printer::filter::datetime(3pm) [debian man page]

Data::Printer::Filter::DateTime(3pm)			User Contributed Perl Documentation		      Data::Printer::Filter::DateTime(3pm)

NAME
Data::Printer::Filter::DateTime - pretty-printing date and time objects (not just DateTime!) SYNOPSIS
In your program: use Data::Printer filters => { -external => [ 'DateTime' ], }; or, in your ".dataprinter" file: { filters => { -external => [ 'DateTime' ], }, }; You can also setup color and display details: use Data::Printer filters => { -external => [ 'DateTime' ], }, color => { datetime => 'bright_green', } datetime => { show_class_name => 1, # default is 0 show_timezone => 0, # default is 1 (only works for DateTime objects) }, }; DESCRIPTION
This is a filter plugin for Data::Printer. It filters through several date and time manipulation classes and displays the time (or time duration) as a string. Parsed Modules o DateTime o DateTime::Duration o DateTime::Incomplete o Time::Piece o Date::Handler o Date::Handler::Delta o Date::Calc::Object o Date::Pcalc::Object If you have any suggestions for more modules or better output, please let us know. SEE ALSO
Data::Printer perl v5.14.2 2011-06-07 Data::Printer::Filter::DateTime(3pm)

Check Out this Related Man Page

Data::Printer::Filter::DB(3pm)				User Contributed Perl Documentation			    Data::Printer::Filter::DB(3pm)

NAME
Data::Printer::Filter::DB - pretty printing database objects SYNOPSIS
In your program: use Data::Printer filters => { -external => [ 'DB' ], }; or, in your ".dataprinter" file: { filters => { -external => [ 'DB' ], }; DESCRIPTION
This is a filter plugin for Data::Printer. It filters through DBI's handlers (dbh) and statement (sth) objects displaying relevant information for the user. DBI is an extremely powerful and complete database interface. But it does a lot of magic under the hood, making their objects somewhat harder to debug. This filter aims to fix that :) For instance, say you want to debug something like this: use DBI; my $dbh = DBI->connect('dbi:DBM(RaiseError=1):', undef, undef ); A regular Data::Dumper output gives you absolutely nothing: $VAR1 = bless( {}, 'DBI::db' ); Data::Printer makes it better, but only to debug the class itself, not helpful at all to see its contents and debug your own code: DBI::db { Parents DBI::common Linear @ISA DBI::db, DBI::common public methods(48) : begin_work, clone, column_info, commit, connected, data_sources, disconnect, do, foreign_key_info, get_info, last_insert_id, ping, prepare, prepare_cached, preparse, primary_key, primary_key_info, quote, quote_identifier, rollback, rows, selectall_arrayref, selectall_hashref, selectcol_arrayref, selectrow_array, selectrow_arrayref, selectrow_hashref, sqlite_backup_from_file, sqlite_backup_to_file, sqlite_busy_timeout, sqlite_collation_needed, sqlite_commit_hook, sqlite_create_aggregate, sqlite_create_collation, sqlite_create_function, sqlite_enable_load_extension, sqlite_last_insert_rowid, sqlite_progress_handler, sqlite_register_fts3_perl_tokenizer, sqlite_rollback_hook, sqlite_set_authorizer, sqlite_update_hook, statistics_info, table_info, tables, take_imp_data, type_info, type_info_all private methods(0) internals: { } } Fear no more! If you use this filter, here's what you'll see: SQLite Database Handle (connected) { dbname: file.db Auto Commit: 1 Statement Handles: 0 Last Statement: - } Much better, huh? :) Statement handlers are even better. Imagine you continued your code with something like: my $sth = $dbh->prepare('SELECT * FROM foo WHERE bar = ?'); $sth->execute(42); With this filter, instead of an empty dump or full method information, you'll get exactly what you came for: SELECT * FROM foo WHERE bar = ? (42) Note that if your driver does not support holding of parameter values, you'll get a "bindings unavailable" message instead of the bound values. SEE ALSO
Data::Printer perl v5.14.2 2011-05-30 Data::Printer::Filter::DB(3pm)
Man Page