develooper Front page | perl.perl5.porters | Postings from April 2014

Re: [perl #121512] .pmc not loaded if @INC has a trailing slash

Thread Previous | Thread Next
From:
wolfsage
Date:
April 1, 2014 16:42
Subject:
Re: [perl #121512] .pmc not loaded if @INC has a trailing slash
Message ID:
CAJ0K8bhBw83hoSbFSEopHwpZFV+Hn2YQK=cn6AG+FXPWm4=sVg@mail.gmail.com
On Mon, Mar 31, 2014 at 7:28 PM, Tony Cook via RT
<perlbug-followup@perl.org> wrote:
> I think this patch or something like it should be applied to blead and backported.
>
> The only issue I have with the patch itself is it could be simpler, instead of adding extra variable, the if could simply ++dirlen when it bumps tmp.
>
> Nothing else within the scope depends on dirlen being the length of the original @INC entry.

Thanks for the review Tony. Attached a version with your suggested changes.

Side question (related to both of these patches) - is it bad that in
the case of dirs that already end with '/', we're calling SvGROW with
one more byte than we end up using? Or is there nothing wrong with
SvGROW to an arbitrary length and SvCUR_set to a smaller size?

Thanks,

-- Matthew Horsfall (alh)

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