Revision 22723065
Von Moritz Bunkus vor mehr als 3 Jahren hinzugefügt
SL/Locale/String.pm | ||
---|---|---|
13 | 13 |
|
14 | 14 |
use overload |
15 | 15 |
'""' => \&translated, |
16 |
eq => \&my_eq; |
|
16 |
eq => \&my_eq, |
|
17 |
ne => \&my_ne; |
|
17 | 18 |
|
18 | 19 |
sub translated { |
19 | 20 |
my ($self) = @_; |
... | ... | |
31 | 32 |
$_[1] eq $_[0]->translated; |
32 | 33 |
} |
33 | 34 |
|
35 |
sub my_ne { |
|
36 |
$_[1] ne $_[0]->translated; |
|
37 |
} |
|
38 |
|
|
34 | 39 |
sub TO_JSON { |
35 | 40 |
return $_[0]->translated; |
36 | 41 |
} |
Auch abrufbar als: Unified diff
SL::Locale::String: ne überladen