PERLANCAR::ShellQuote::Any - Escape strings for the shell on Unix or MSWin32
This document describes version 0.001 of PERLANCAR::ShellQuote::Any (from Perl distribution PERLANCAR-ShellQuote-Any), released on 2016-09-26.
use ShellQuote::Any; # exports shell_quote() shell_quote('curl', 'http://example.com/?foo=123&bar=baz'); # curl 'http://example.com/?foo=123&bar=baz'
This distribution is currently For testing only.
Quote command @cmd according to $os (defaults to $^O). On Windows, will use Win32::ShellQuote's quote_system_string(). Otherwise, will use String::ShellQuote's shell_quote(). Exported by default.
@cmd
$os
$^O
quote_system_string()
shell_quote()
If you want to simulate how quoting is done under another OS, you could do something like:
{ local $^O = "Win32"; # simulate Windows say shell_quote("foo bar"); }
Please visit the project's homepage at https://metacpan.org/release/PERLANCAR-ShellQuote-Any.
Source repository is at https://github.com/perlancar/perl-PERLANCAR-ShellQuote-Any.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=PERLANCAR-ShellQuote-Any
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.
Win32::ShellQuote
String::ShellQuote
ShellQuote::Any
perlancar <perlancar@cpan.org>
This software is copyright (c) 2016 by 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.
To install PERLANCAR::ShellQuote::Any, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PERLANCAR::ShellQuote::Any
CPAN shell
perl -MCPAN -e shell install PERLANCAR::ShellQuote::Any
For more information on module installation, please visit the detailed CPAN module installation guide.