From: jeff Date: Sun, 17 Jan 2010 00:22:07 +0000 (+0000) Subject: work around bug in pre-perl5.10 which is at best noisy and at worst missorting X-Git-Tag: root_of_svc_elec_features~539 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=38bbacc269ad5f529790b22cb3224e00231ee551 work around bug in pre-perl5.10 which is at best noisy and at worst missorting --- diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index fa0fa6981..a95a67d2e 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -1535,8 +1535,11 @@ sub h_cust_svc { sub _sort_cust_svc { my( $self, $arrayref ) = @_; + my $sort = + sub ($$) { my ($a, $b) = @_; $b->[1] cmp $a->[1] or $a->[2] <=> $b->[2] }; + map { $_->[0] } - sort { $b->[1] cmp $a->[1] or $a->[2] <=> $b->[2] } + sort $sort map { my $pkg_svc = qsearchs( 'pkg_svc', { 'pkgpart' => $self->pkgpart, 'svcpart' => $_->svcpart } );