foreach (qw ( city county state zip ) ) {
my $method = "$prefix$_";
if ( $self->$method ) {
- $line .= '(' if $method eq 'county';
+ $line .= ' (' if $method eq 'county';
$line .= ($notfirst ? ' ' : $separator). &$escape($self->$method);
- $line .= ')' if $method eq 'county';
+ $line .= ' )' if $method eq 'county';
$notfirst++;
}
}
# This should be generalized to use config options to determine order.
sub sort_packages {
- my $locationsort = $a->locationnum <=> $b->locationnum;
+ my $locationsort = ( $a->locationnum || 0 ) <=> ( $b->locationnum || 0 );
return $locationsort if $locationsort;
if ( $a->get('cancel') xor $b->get('cancel') ) {