Skip Menu |

This queue is for tickets about the PAR CPAN distribution.

Report information
The Basics
Id: 80151
Status: resolved
Priority: 0/
Queue: PAR

People
Owner: RSCHUPP [...] cpan.org
Requestors: keno [...] cpan.org
Cc: tim_hoke [...] symantec.com
AdminCc:

Bug Information
Severity: Important
Broken in: 1.005
Fixed in: (no value)



CC: tim_hoke [...] symantec.com
Subject: non-fallback repository should on the front of the queue
Suppose we use a repository as follows: require PAR; PAR->import( { repository => $url1, fallback => 0, # check repository first } ); Then, we use another repository: PAR->import( { repository => $url2, fallback => 0, # check repository first } ); Later, we require Foo, and both repositories contain a Foo module. Which repository's Foo should be loaded? Today PAR::import gives priority to $url1, but I claim it should be $url2. Does anyone disagree? The patch is attached. Thanks! Ken
Subject: PriorityRepositoryObjects.diff
--- lib/PAR.pm.orig 2012-10-12 10:40:55.000000000 -0500 +++ lib/PAR.pm 2012-10-12 10:41:10.000000000 -0500 @@ -550,7 +550,7 @@ } if (exists($opt->{fallback}) and not $opt->{fallback}) { - push @PriorityRepositoryObjects, $obj; # repository beats local stuff + unshift @PriorityRepositoryObjects, $obj; # repository beats local stuff } else { push @RepositoryObjects, $obj; # local stuff beats repository }
Applied. Docs give no hint what behaviour to expect, but the proposed is similar to multiple "use lib" statements.