Closed wielandp closed 1 year ago
My testing:
wp@DESKTOP-5OCF6FQ:~/src/pls$ cat stdin.txt ; echo
arg=value&cid=1&preview=Здравейте
wp@DESKTOP-5OCF6FQ:~/src/pls$ cat test_stdin.pl
use strict;
use warnings;
use CGI;
use JSON;
use utf8;
use open ':std', ':encoding(UTF-8)';
my $q = CGI->new;
print "cid: ".$q->param('cid')."\n";
print "preview: ".$q->param('preview')."\n";
{
"type": "perl",
"request": "launch",
"name": "Perl-Debug",
"program": "${workspaceFolder}/${relativeFile}",
"stopOnEntry": true,
"reloadModules": true,
"env": {
"REQUEST_METHOD": "POST",
"CONTENT_TYPE": "application/x-www-form-urlencoded",
"CONTENT_LENGTH": 34
}
"args": [ "<", "/home/wp/src/pls/stdin.txt" ]
}
cid: 1
preview: Здравейте
files changed looks good. Only the comments are confusing
Redirect stdin if in args ..., "<", "filename", ...