Revision f203aa21
Von Moritz Bunkus vor fast 14 Jahren hinzugefügt
SL/DB/Helper/LinkedRecords.pm | ||
---|---|---|
14 | 14 |
my %params = @_; |
15 | 15 |
|
16 | 16 |
my $wanted = $params{direction} || croak("Missing parameter `direction'"); |
17 |
my $myself = $wanted eq 'from' ? 'to' : 'from';
|
|
17 |
my $myself = $wanted eq 'from' ? 'to' : $wanted eq 'to' ? 'from' : croak("Invalid parameter `direction'");
|
|
18 | 18 |
|
19 | 19 |
my $my_table = SL::DB::Helpers::Mappings::get_table_for_package(ref($self)); |
20 | 20 |
|
Auch abrufbar als: Unified diff
Bessere Parameterüberprüfung