- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
# ...
my @suitable =
sort {
my $cmp = 0;
for my $attr (qw(_customer_class _environment _authorship)) {
if (defined($a->{$attr}) && defined($b->{$attr})) {
if ($attr eq '_authorship') {
if ($a->{$attr} ne TEMPLATE_AUTHORSHIP_SYSTEM) {
$cmp = -1; last;
}
else {
$cmp = 1; last;
}
}
else {
next;
}
}
elsif (defined($a->{$attr})) {
$cmp = -1; last;
}
elsif (defined($b->{$attr})) {
$cmp = 1; last;
}
else {
next;
}
}
return $cmp;
}
grep {
(!defined($_->{_customer_class}) || $_->{_customer_class} == $params{customer_class})
&&
(!defined($_->{_environment}) || $_->{_environment} == $params{environment})
} @found;
Elvenfighter 27.12.2012 16:17 # +1
Dummy00001 27.12.2012 17:40 # +5
anonimb84a2f6fd141 27.12.2012 21:27 # 0
http://tinyurl.com/d4mtlmk
Dummy00001 27.12.2012 21:32 # +2
a282750 24.08.2021 22:16 # 0