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

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

Thread Previous | Thread Next
From:
Christian Walde
Date:
February 15, 2021 14:29
Subject:
Re: No to trim() WAS Re: Looking for someone to adopt adding trim()to core
Message ID:
op.0yu07nl8ydyjqt@xenwide.vpn.udag.de
On Mon, 15 Feb 2021 14:48:26 +0100, Felipe Gasper <felipe@felipegasper.com> wrote:

>
>> 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.


fwiw at this point the question isn't "does it go into core?" but "how does it go into core?" :)


-- 
With regards,
Christian Walde

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