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

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

Thread Previous | Thread Next
From:
Tony Cook via RT
Date:
March 31, 2014 23:28
Subject:
[perl #121512] .pmc not loaded if @INC has a trailing slash
Message ID:
rt-4.0.18-1221-1396308492-1571.121512-15-0@perl.org
On Mon Mar 31 05:32:55 2014, alh wrote:
> > RT-116192 - If a directory in @INC already has a trailing '/', don't
> > add another.
> 
> My apologies! Patch attached.
> 
> The original code always assumed a '/' would be appended, so it set
> the length of the resulting SV to be +1.
> 
> With my earlier patch, this wasn't the case if the SV already ended in
> a '/', so later checks on the SV that were based off the length of the
> SV would be wrong.
> 
> New tests included.

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.

Tony

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=121512

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