NAME
PERLANCAR::ShellQuote::Any - Escape strings for the shell on Unix or MSWin32
VERSION
This document describes version 0.002 of PERLANCAR::ShellQuote::Any (from Perl distribution PERLANCAR-ShellQuote-Any), released on 2016-09-27.
SYNOPSIS
use ShellQuote::Any; # exports shell_quote()
shell_quote('curl', 'http://example.com/?foo=123&bar=baz');
# curl 'http://example.com/?foo=123&bar=baz'
DESCRIPTION
This distribution is currently For testing only.
FUNCTIONS
shell_quote(@cmd) => str
Quote command @cmd
according to OS. On Windows, will use Win32::ShellQuote's quote_system_string()
. Otherwise, will use String::ShellQuote's shell_quote()
. Exported by default.
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");
}
HOMEPAGE
Please visit the project's homepage at https://metacpan.org/release/PERLANCAR-ShellQuote-Any.
SOURCE
Source repository is at https://github.com/perlancar/perl-PERLANCAR-ShellQuote-Any.
BUGS
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.
SEE ALSO
AUTHOR
perlancar <perlancar@cpan.org>
COPYRIGHT AND LICENSE
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.