X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/7ff7dd017542c32a8f8111167fda69857de50910..054633019b5bf3df798cc31a82dc2c8608a72316:/SL/Locale/String.pm diff --git a/SL/Locale/String.pm b/SL/Locale/String.pm index e05ae6abe..63a53231b 100644 --- a/SL/Locale/String.pm +++ b/SL/Locale/String.pm @@ -11,7 +11,9 @@ use Rose::Object::MakeMethods::Generic ( our @EXPORT = qw(t8); -use overload '""' => \&translated; +use overload + '""' => \&translated, + eq => \&my_eq; sub translated { my ($self) = @_; @@ -25,6 +27,10 @@ sub t8 { return SL::Locale::String->new(untranslated => $string, args => [ @_ ]); } +sub my_eq { + $_[1] eq $_[0]->translated; +} + sub TO_JSON { return $_[0]->translated; }