develooper Front page | perl.perl5.porters | Postings from November 2020

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

Thread Previous | Thread Next
From:
Yuki Kimoto
Date:
November 18, 2020 22:32
Subject:
Re: Looking for someone to adopt adding trim() to core
Message ID:
CAExogxNvb3Ys1CkWz5hw7YoMLgO9m6s5L9+NWD9kz8j0_=6v3g@mail.gmail.com
I think trim is just a function.

The function means that it takes arguments and returns return value.

I think the benefits of adding trim as a Perl grammar are small.

I think it's a best idea to add trim to Scalar::Util.

use Scalar::Util 'trim';

trim $string;

The reason is that there are a few changes and the benefits are great.

I think The next best idea is to add a new namespace.

use Scalar 'trim';

trim $string;

This adds a new namespace, or module, so the size of the changes will be a
bit larger.


2020年11月19日(木) 5:20 Christian Walde <walde.christian@gmail.com>:

> One more note:
>
> say is EXTREMELY similar to trim, and as far as i can tell was VERY well
> received and caused no significant issues. Right?
>
> --
> 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