App-hr
view release on metacpan or search on metacpan
#=head2 $Data::Dmp::OPT_MAX_DUMP_LEN_BEFORE_ELLIPSIS
#
#Int, default: 70.
#
#Used by L</dd_ellipsis> and L</dmp_ellipsis>.
#
#=head1 BENCHMARKS
#
# [1..10]:
# Rate/s Precision/s Data::Dump Data::Dumper Data::Dmp
# Data::Dump 24404 95 -- -61.6% -75.6%
# Data::Dumper 63580 210 160.5+-1.3% -- -36.4%
# Data::Dmp 99940 130 309.5+-1.7% 57.18+-0.55% --
#
# [1..100]:
# Rate/s Precision/s Data::Dump Data::Dumper Data::Dmp
# Data::Dump 2934.3 7.8 -- -75.3% -76.2%
# Data::Dumper 11873 32 304.6+-1.5% -- -3.7%
# Data::Dmp 12323.4 4 320+-1.1% 3.8+-0.28% --
#
# Some mixed structure:
#Generate an enveloped error response (see L<Rinci::function>). Can accept
#arguments in an unordered fashion, by utilizing the fact that status codes are
#always integers, messages are strings, result metadata are hashes, and previous
#error responses are arrays. Error responses also seldom contain actual result.
#Status code defaults to 500, status message will default to "FUNC failed". This
#function will also fill the information in the C<logs> result metadata.
#
#Examples:
#
# err(); # => [500, "FUNC failed", undef, {...}];
# err(404); # => [404, "FUNC failed", undef, {...}];
# err(404, "Not found"); # => [404, "Not found", ...]
# err("Not found", 404); # => [404, "Not found", ...]; # order doesn't matter
# err([404, "Prev error"]); # => [500, "FUNC failed", undef,
# # {logs=>[...], prev=>[404, "Prev error"]}]
#
#Will put C<stack_trace> in logs only if C<Carp::Always> module is loaded.
#
#=head2 warn_err(...)
#
#This is a shortcut for:
#
# $res = err(...);
# warn "ERROR $res->[0]: $res->[1]";
#
( run in 0.974 second using v1.01-cache-2.11-cpan-39bf76dae61 )