Movatterモバイル変換


[0]ホーム

URL:


develooperFront page |perl.perl5.porters |Postings from August 2016

Alternative Fix for base.pm dot-in-INC mechanic.

Thread Next
From:
Kent Fredric
Date:
August 14, 2016 21:34
Subject:
Alternative Fix for base.pm dot-in-INC mechanic.
Message ID:
CAATnKFCTbudNM9S5SifvKacRhVMNjzNhFEf4h5yGmPM1FP42Hg@mail.gmail.com
I'm just relaying the contents of: https://github.com/Perl/perl5/pull/10/filesBecause I would be loath if 5.23.3 and 5.24.1 shipped without at leastensuring this properly considered.The essential issue is that by localising @INC in base.pm, any changesmade to @INC by the module being loaded are lost.And so instead of assuming @INC can be simply reverted to its previousstate, it uses a scope guard, and thus tries to effectively localise*only* the absense of '.' by:a) only adding cleanup logic if $INC[-1]  is in fact '.'b) reinserting '.' in the cleanup block on base->import scope exit.Presently, localising is done regardless of the presence of a ".",making any @INC modification in base.pm impossible, even if the userhad already removed '.' themselves.There is other feedback on https://github.com/Perl/perl5/pull/10potentially worth considering.Though the contents of the patch are submitted here verbatim as anattachment for P5P's convenience.-- KentKENTNL - https://metacpan.org/author/KENTNL
Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments toAsk Bjørn Hansen atask@perl.org|Group listing|About

[8]ページ先頭

©2009-2025 Movatter.jp