[2924] in BarnOwl Developers
Re: [PATCH] Sort the output of :irc-names
daemon@ATHENA.MIT.EDU (Anders Kaseorg)
Wed Feb 23 21:09:00 2011
Date: Wed, 23 Feb 2011 21:08:55 -0500 (EST)
From: Anders Kaseorg <andersk@MIT.EDU>
To: Nelson Elhage <nelhage@ksplice.com>
cc: barnowl-dev@mit.edu
In-Reply-To: <1298512802-12911-1-git-send-email-nelhage@mit.edu>
use strict;
use warnings;
On Wed, 23 Feb 2011, Nelson Elhage wrote:
> +sub cmp_user {
> + my ($lhs, $rhs) = (@_);
> + my ($sigil_l) = ($lhs =~ m{^[+@]}g);
> + my ($sigil_r) = ($rhs =~ m{^[+@]}g);
> + my %rank = (
> + '@' => 2,
> + '+' => 1,
> + '' => -1
> + );
> + return (($rank{$sigil_r}||0) <=> ($rank{$sigil_l}||0)) ||
> + $rhs cmp $lhs;
Use of uninitialized value $sigil_r in hash element at cmp_user.pl line 13.
Use of uninitialized value $sigil_l in hash element at cmp_user.pl line 13.
> +}
> +
Anders