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

Re: [perl.git] branch blead updated. v5.27.8-367-g7bb6e12450

Thread Previous
From:
demerphq
Date:
February 24, 2018 07:23
Subject:
Re: [perl.git] branch blead updated. v5.27.8-367-g7bb6e12450
Message ID:
CANgJU+Wu9gG_E0nrx3ThW6piYyc6Oep+PqS8UfzhCfwa6S1nEA@mail.gmail.com
On 24 Feb 2018 3:13 pm, "Sawyer X" <xsawyerx@gmail.com> wrote:



On 02/24/2018 06:01 AM, demerphq wrote:
> I have reverted this commit until we decide if its ok to break .pmc's.

I agree this is the correct action.



It turned out that the docs are a bit misleading. The patch did not break
.pmc's and I pushed a revert of the revert.

The whole .pmc thing needs review tho. The docs are terrible and it has
performance implications.

Yves



>
> Yves
>
> On 24 February 2018 at 04:39, demerphq <demerphq@gmail.com> wrote:
>> This breaks .pmc's
>>
>> Which I already posted about. I am not sure if we should care tho.
>>
>> Yves
>>
>> On 24 February 2018 at 04:33, Father Chrysostomos <sprout@cpan.org>
wrote:
>>> In perl.git, the branch blead has been updated
>>>
>>> <https://perl5.git.perl.org/perl.git/commitdiff/
7bb6e12450c58b7094ccdfa7025fa495d3996bcf?hp=b4dcd72d7c1fd970030db81f13b382
4d51aeb9b6>
>>>
>>> - Log -----------------------------------------------------------------
>>> commit 7bb6e12450c58b7094ccdfa7025fa495d3996bcf
>>> Author: Father Chrysostomos <sprout@cpan.org>
>>> Date:   Fri Feb 23 19:32:51 2018 -0800
>>>
>>>     Carp: Avoid string eval
>>>
>>>     Carp’s particular use of string eval is unnecessary in this case,
and
>>>     slower than the alternative.  Carp’s reason for using string eval is
>>>     to avoid the effect of bareword require vivifying a package.  But
that
>>>     only applies to bareword require, and not other forms of require:
>>>
>>>     $ perl -le 'print $::{"overload::"}||"nothing"; require overload'
>>>     *main::overload::
>>>     $ perl -le 'print $::{"overload::"}||"nothing"; require "overload.pm
"'
>>>     nothing
>>>
>>>     Since string eval has to set up a parser and a new scope, it is much
>>>     slower that require, and quite unnecessary here.
>>>
>>> -----------------------------------------------------------------------
>>>
>>> Summary of changes:
>>>  dist/Carp/lib/Carp.pm | 8 ++++----
>>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/dist/Carp/lib/Carp.pm b/dist/Carp/lib/Carp.pm
>>> index 610e07fe1a..3de78d9f6f 100644
>>> --- a/dist/Carp/lib/Carp.pm
>>> +++ b/dist/Carp/lib/Carp.pm
>>> @@ -343,10 +343,10 @@ sub format_arg {
>>>                 # so we need to use overload::StrVal() below.  But it's
>>>                 # possible that the overload module hasn't been loaded:
>>>                 # overload methods can be installed without it.  So load
>>> -               # the module here.  The eval layer here avoids the
>>> -               # compile-time effect of require vivifying the target
>>> -               # module's stash.
>>> -                eval "require overload; 1"
>>> +               # the module here.  The bareword form of require is here
>>> +               # eschewed to avoid iths compile-time effect of
vivifying
>>> +               # vivifying the target module's stash.
>>> +                require "overload.pm"
>>>                      or return "use overload failed";
>>>              }
>>>              my $sub = _fetch_sub(overload => 'StrVal');
>>>
>>> --
>>> Perl5 Master Repository
>>
>>
>> --
>> perl -Mre=debug -e "/just|another|perl|hacker/"
>
>

Thread Previous


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