Permalink
Browse files

Use Text::ParseWords instead of shellwords.pl

The shellwords.pl library is deprecated and will be removed in a future
version of perl. Text::ParseWords has been in core since 5.0.0 and it is
used by shellwords.pl already.
  • Loading branch information...
1 parent 621a98f commit 0cf175dbfbeaa46d71343412c715096da5bd0eaf @ghedo ghedo committed Nov 22, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/CGI.pm
View
@@ -3530,11 +3530,11 @@ sub read_from_cmdline {
if ($DEBUG && @ARGV) {
@words = @ARGV;
} elsif ($DEBUG > 1) {
- require "shellwords.pl";
+ require Text::ParseWords;
print STDERR "(offline mode: enter name=value pairs on standard input; press ^D or ^Z when done)\n";
chomp(@lines = <STDIN>); # remove newlines
$input = join(" ",@lines);
- @words = &shellwords($input);
+ @words = &Text::ParseWords::old_shellwords($input);
}
for (@words) {
s/\\=/%3D/g;

0 comments on commit 0cf175d

Please sign in to comment.