develooper Front page | perl.perl5.porters | Postings from February 2021

No to trim() WAS Re: Looking for someone to adopt adding trim() tocore

Thread Previous | Thread Next
From:
Felipe Gasper
Date:
February 15, 2021 13:48
Subject:
No to trim() WAS Re: Looking for someone to adopt adding trim() tocore
Message ID:
C62EBEF0-2AF8-46D5-872A-86115B0B6E19@felipegasper.com

> On Feb 15, 2021, at 6:56 AM, Christian Walde <walde.christian@gmail.com> wrote:
> 
> 
> Oh yeah, and keep in mind that Perl is primarily a string manipulation language.

For what it’s worth:

10-15 years ago cPanel would have used trim() extensively because, with the state of JavaScript as it was, lots of data that came into Perl was straight from a plain HTML form.

In 2021 almost all input should be trim()med and/or otherwise massaged in the client (i.e., browser). So nowadays cPanel would more likely reject untrim()ed inputs rather than massage them in Perl.

They’d still likely find trim() useful in isolated contexts, e.g., CLI scripts and the like. But by and large, it’d be irrelevant. IMO this functionality is better suited to a (core?) module.

-F
Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About