Chj::singlequote
use Chj::singlequote qw(singlequote singlequote_many with_maxlen); is with_maxlen(9, sub { singlequote "Darc's place" }), "'Darc\\'s...'";
Turn strings to quoted strings.
Perl style quoting.
If $maybe_alternative is not given, uses the string "undef" for the undef value.
Shell style quoting.
Also currently uses the "undef" value as default alternative, although not making much sense.
In list context returns each argument quoted. In scalar context, join them with a comma inbetween.
Unlike the separate ones above, this captures exceptions during the quoting process (stringification errors) and returns "<stringification error: $@>" in that case.
This is alpha software! Read the status section in the package README or on the website.
To install FunctionalPerl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm FunctionalPerl
CPAN shell
perl -MCPAN -e shell install FunctionalPerl
For more information on module installation, please visit the detailed CPAN module installation guide.