Citings? I don't see anything about Vars corrupting data specifically. In perldoc CGI:
"Note that you must use ->upload or ->param to get the file-handle to pass into uploadInfo as internally this is represented as a File::Temp object (which is what will be returned by ->upload or ->param). When using ->Vars you will get the literal filename rather than the File::Temp object, which will not return anything when passed to uploadInfo. So don't use ->Vars."
"If you are using a machine that recognizes "text" and "binary" data modes, be sure to understand when and how to use them (see the Camel book). Otherwise you may find that binary files are corrupted during file uploads."
When making blanket statements like "CGI->Vars corrupts data", please source it with authoritative material (where available), or at least explain some detail of the problem.
| [reply] [d/l] |
Citings? I don't see anything about Vars corrupting data specifically. In perldoc CGI:.... When making blanket statements like "CGI->Vars corrupts data", please source it with authoritative material (where available), or at least explain some detail of the problem.
I didn't post links because its hard to type on a flip phone, can't check my links before posting
Searching the docs for the word "corrupt" might not be productive, but reading the docs for Vars makes it clear what it does and how its design isn't something you ever want
Lots of people skim the docs and think it only returns a hash and that they should use it because they want a simple hash, but there are caveats
But here you go stevieb use CGI->param instead of CGI->Vars , CGI->Vars has caveats , its broken by design , Re: Manually add parameters in perl cgi ( no ReadParse no CGI->Vars, Re^5: Read JSON data from a form (CGI->Vars), Re^5: Read JSON data from a form (CGI->VarsAsHash ), Re^5: Stop Using Perl
| [reply] |