| 1 | package Menlo::Util; | ||
| 2 | use strict; | ||
| 3 | |||
| 4 | use Exporter; | ||
| 5 | our @ISA = qw(Exporter); | ||
| 6 | our @EXPORT_OK = qw(WIN32); | ||
| 7 | |||
| 8 | use constant WIN32 => $^O eq 'MSWin32'; | ||
| 9 | |||
| 10 | if (WIN32) { | ||
| 11 | require Win32::ShellQuote; | ||
| 12 | *shell_quote = \&Win32::ShellQuote::quote_native; | ||
| 13 | } else { | ||
| 14 | require String::ShellQuote; | ||
| 15 | *shell_quote = \&String::ShellQuote::shell_quote_best_effort; | ||
| 16 | } | ||
| 17 | |||
| 18 | 1; | ||
| 19 |