App-safer
view release on metacpan or search on metacpan
script/safer view on Meta::CPAN
[plugin=Foo]
-event=after_validate_args
arg1=val1
arg2=val2
which is equivalent to setting C<< -plugins=-DumpArgs@before_validate_args@99,-Foo@after_validate_args,arg1,val1,arg2,val2 >>.
List of available configuration parameters:
action (see --action)
detail (see --detail)
encoding (see --encoding)
format (see --format)
naked_res (see --naked-res)
text (see --text)
=head1 ENVIRONMENT
=head2 SAFER_OPT
String. Specify additional command-line options.
=head1 FILES
=head2 /home/u1/.config/safer.conf
=head2 /home/u1/safer.conf
=head2 /etc/safer.conf
=head1 EXAMPLES
=head2 List available encodings
% safer -l
alphanum_kebab
alphanum_kebab_nodashend_lc
alphanum_snake
alphanum_snake_lc
=head2 List available encodings (verbose mode)
% safer -ll
+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+------+
| encoding | summary | args |
+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+------+
| alphanum_kebab | Replace sequences of non-alphanumeric characters (underscores not included) with a single dash, e.g. Foo_Bar!!!Baz. -> Foo_Bar-Baz- | lc |
| alphanum_kebab_nodashend_lc | Like alphanum_kebab, but additionally lower case & remove dash at the beginning & end of text, e.g. "Foo Bar, Co., Ltd." -> "foo-bar-co-ltd" | |
| alphanum_snake | Replace sequences of non-alphanumeric characters (including dashes) with a single underscore, e.g. Foo-Bar_Baz!!!Qux-. -> Foo_Bar_Baz_Qux_ | lc |
| alphanum_snake_lc | Like alphanum_snake, but additionally lower case | |
+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+------+
=head2 Convert a single text
% echo 'Foo Bar, Co., Ltd.' | safer
foo-bar-co-ltd
=head2 Convert each line then show result and add to clipboard (required clipadd from App::ClipboardUtils)
% clipadd -c safer --tee
=head1 HOMEPAGE
Please visit the project's homepage at L<https://metacpan.org/release/App-safer>.
=head1 SOURCE
Source repository is at L<https://github.com/perlancar/perl-App-safer>.
=head1 AUTHOR
perlancar <perlancar@cpan.org>
=head1 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 L<Dist::Zilla>,
L<Dist::Zilla::PluginBundle::Author::PERLANCAR>,
L<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.
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2025 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.
=head1 BUGS
Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=App-safer>
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.
=cut
( run in 0.909 second using v1.01-cache-2.11-cpan-2398b32b56e )