On Wed 19 Jul 2006, Dave Carrigan wrote:
> On Wednesday 19 July 2006 09:34, Paul Slootman wrote:
> 
> > > --- /tmp/dirvish-expire   2006-07-19 08:59:01.000000000 -0700
> > > +++ /usr/sbin/dirvish-expire      2006-07-19 08:58:31.000000000 -0700
> > > @@ -145,7 +145,7 @@
> > >           qw(VAULT:BRANCH IMAGE CREATED EXPIRED);
> > >  }
> > >
> > > -for $expire (sort(imsort(@expires)))
> > > +for $expire (sort(imsort @expires))
> > >  {
> > >   my ($created, $expired);
> > >   ($created = $$expire{created}) =~ s/:\d\d$//;
> 
> dirvish 1.2-1 has the "imsort @expires" line.
> dirvish 1.2.1-0.1 has the "imsort(@expires)" line.
> dirvish 1.2.1 downloaded from www.dirvish.org has "imsort @expires".
> 
> The culprit is debian/patches/01_imsort-reserved-warning.dpatch which sticks 
> the extra parentheses in there. 

Hmm, apparently to fix bug #289026.

> The syntax "sort(imsort @expires)" tells perl to sort @expires using the 
> imsort function to do the comparison (imsort returns a scalar integer).
> 
> The syntax "sort(imsort(@expires))" tells perl to call imsort on the @expires 
> list, and then sort the result using the string comparison operator.

Ah, of course. I was thinking of the parentheses being used to force
list context. What was I thinking :)


thanks,
Paul Slootman


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to