work around bug in pre-perl5.10 which is at best noisy and at worst missorting
[freeside.git] / FS / FS / cust_pkg.pm
index 8110d73..a95a67d 100644 (file)
@@ -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     } );
@@ -1946,16 +1949,16 @@ sub cust_location_or_main {
   $self->cust_location || $self->cust_main;
 }
 
-=item location_label_short
+=item location_label [ OPTION => VALUE ... ]
 
-Returns the short label of the location object (see L<FS::cust_location>).
+Returns the label of the location object (see L<FS::cust_location>).
 
 =cut
 
-sub location_label_short {
+sub location_label {
   my $self = shift;
   my $object = $self->cust_location_or_main;
-  $object->location_label_short;
+  $object->location_label(@_);
 }
 
 =item seconds_since TIMESTAMP