From 513c24f31f91dc5b888baf6f25f65866e090adf6 Mon Sep 17 00:00:00 2001 From: erickson Date: Sat, 12 Mar 2005 02:19:40 +0000 Subject: [PATCH] added == to number git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@220 9efc2488-bf62-4759-914b-345cdb29e865 --- src/perlmods/JSON.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/perlmods/JSON.pm b/src/perlmods/JSON.pm index 653b622..c878f86 100644 --- a/src/perlmods/JSON.pm +++ b/src/perlmods/JSON.pm @@ -13,6 +13,7 @@ use overload ( '/' => sub { int($_[0]) / int($_[1]) } ); use overload ( '%' => sub { int($_[0]) % int($_[1]) } ); use overload ( '**' => sub { int($_[0]) ** int($_[1]) } ); use overload ( 'neg' => sub { -int($_[0]) } ); +use overload ( '==' => sub { int($_[0]->toString) == int($_[1])} ); sub toString { defined($_[1]) ? ${$_[1]} : ${$_[0]} } -- 2.11.0