The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Carp::Patch::Config - Set some Carp variables

VERSION

This document describes version 0.008 of Carp::Patch::Config (from Perl distribution Carp-Patch-Config), released on 2024-02-16.

SYNOPSIS

 % perl -MCarp::Patch::Config=-MaxArgNums,20,-Dump,1 -d:Confess ...

DESCRIPTION

This is not so much a "patch" for Carp, but just a convenient way to set some Carp package variables from the command-line. Currently can set these variables: MaxArgLen, MaxArgNums.

PATCH CONTENTS

PATCH CONFIGURATION

  • -Dump => str

    This is not an actual configuration for Carp, but a shortcut for:

     # when value is 0 or 'none'
     $Carp::RefArgFormatter = undef;
     
     # when value is 1 or 'Data::Dmp'
     $Carp::RefArgFormatter = sub {
         require Data::Dmp;
         Data::Dmp::dmp($_[0]);
     };
     
     # when value is 2 or 'Data::Dump'
     $Carp::RefArgFormatter = sub {
         require Data::Dump;
         Data::Dump::dump($_[0]);
     };
     
     # when value is 3 or 'Data::Dump::ObjectAsString'
     $Carp::RefArgFormatter = sub {
         require Data::Dump::ObjectAsString;
         Data::Dump::ObjectAsString::dump($_[0]);
     };
     
     # when value is 4 or 'Data::Dump::IfSmall'
     $Carp::RefArgFormatter = sub {
         require Data::Dump::IfSmall;
         Data::Dump::IfSmall::dump($_[0]);
     };
  • -MaxArgLen => int

  • -MaxArgNums => int

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/Carp-Patch-Config.

SOURCE

Source repository is at https://github.com/perlancar/perl-Carp-Patch-Config.

SEE ALSO

Module::Patch

Carp

Devel::Confess

Carp::Patch::Verbose

AUTHOR

perlancar <perlancar@cpan.org>

CONTRIBUTING

To contribute, you can send patches by email/via RT, or send pull requests on GitHub.

Most of the time, you don't need to build the distribution yourself. You can simply modify the code, then test via:

 % prove -l

If you want to build the distribution (e.g. to try to install it locally on your system), you can install Dist::Zilla, Dist::Zilla::PluginBundle::Author::PERLANCAR, Pod::Weaver::PluginBundle::Author::PERLANCAR, and sometimes one or two other Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond that are considered a bug and can be reported to me.

COPYRIGHT AND LICENSE

This software is copyright (c) 2024, 2020, 2019, 2016 by perlancar <perlancar@cpan.org>.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Carp-Patch-Config

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.