App-AcmeCpanauthors
view release on metacpan or search on metacpan
script/_acme-cpanauthors view on Meta::CPAN
# log_debug "Data for %s is %s", "budi", {foo=>'blah', bar=>undef};
# # will format the log message as: Data for budi is {bar=>undef,foo=>"blah"}
#
#=head1 DESCRIPTION
#
#This is the default Log::ger formatter, which: 1) passes the argument as-is if
#there is only a single argument; or, if there are more than one argument, 2)
#treats the arguments like sprintf(), where the first argument is the template
#and the rest are variables to be substituted to the conversions inside the
#template. In the second case, reference arguments will be dumped using
#L<Data::Dmp> or L<Data::Dumper> by default (but the dumper is configurable by
#setting C<$Log::ger::_dumper>; see for example L<Log::ger::UseDataDump> or
#L<Log::ger::UseDataDumpColor>).
#
#The same code is already included in L<Log::ger::Heavy>; this module just
#repackages it so it's more reusable.
#
#=for Pod::Coverage ^(.+)$
#
#=head1 SEE ALSO
#
script/_acme-cpanauthors view on Meta::CPAN
#sub _dump {
# unless ($Log::ger::_dumper) {
# eval {
# no warnings 'once';
# require Data::Dmp;
# $Data::Dmp::OPT_REMOVE_PRAGMAS = 1;
# 1;
# };
# if ($@) {
# no warnings 'once';
# require Data::Dumper;
# $Log::ger::_dumper = sub {
# local $Data::Dumper::Terse = 1;
# local $Data::Dumper::Indent = 0;
# local $Data::Dumper::Useqq = 1;
# local $Data::Dumper::Deparse = 1;
# local $Data::Dumper::Quotekeys = 0;
# local $Data::Dumper::Sortkeys = 1;
# local $Data::Dumper::Trailingcomma = 1;
# local $Data::Dumper::Useqq = 1; # to show "\034", possible bug in Data::Dumper
# Data::Dumper::Dumper($_[0]);
# };
# } else {
# $Log::ger::_dumper = sub { Data::Dmp::dmp($_[0]) };
# }
# }
# $Log::ger::_dumper->($_[0]);
#}
#
#sub numeric_level {
# my $level = shift;
script/acme-cpanauthors view on Meta::CPAN
# $res = $res->[2] if $is_naked;
#
# if ($format eq 'perl') {
# my $use_color = $ENV{COLOR} // (-t STDOUT);
# if ($use_color && eval { require Data::Dump::Color; 1 }) {
# return Data::Dump::Color::dump($res);
# } elsif (eval { require Data::Dump; 1 }) {
# return Data::Dump::dump($res);
# } else {
# no warnings 'once';
# require Data::Dumper;
# local $Data::Dumper::Terse = 1;
# local $Data::Dumper::Indent = 1;
# local $Data::Dumper::Useqq = 1;
# local $Data::Dumper::Deparse = 1;
# local $Data::Dumper::Quotekeys = 0;
# local $Data::Dumper::Sortkeys = 1;
# local $Data::Dumper::Trailingcomma = 1;
# return Data::Dumper::Dumper($res);
# }
# }
#
# unless ($format =~ /\Ajson(-pretty)?\z/) {
# warn "Unknown format '$format', fallback to json-pretty";
# $format = 'json-pretty';
# }
# __cleanse($res) if ($cleanse//1);
# if ($format =~ /json/) {
# if ($tff && _json->can("sort_by") &&
( run in 0.234 second using v1.01-cache-2.11-cpan-4d50c553e7e )