# New Ticket Created by fernandocor...@gmail.com # Please include the string: [perl #67046] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=67046 >
implemented: - "not" "Object"'s method - "sign" "Num"'s method Thats my first time to send a patch, I don't know if its OK, but I really want to help. Thanks -- Just another Perl Hacker, Fernando (SmokeMachine) http://perl-e.org
>From 8d90f2ee17a1171a5a3e0972d018af123fb20fdb Mon Sep 17 00:00:00 2001 From: Fernando Correa de Oliveira <fernandocor...@gmail.com> Date: Mon, 29 Jun 2009 02:04:35 -0300 Subject: [PATCH] not method added --- src/setting/Object.pm | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/setting/Object.pm b/src/setting/Object.pm index ec0b45e..66d3e29 100644 --- a/src/setting/Object.pm +++ b/src/setting/Object.pm @@ -73,6 +73,10 @@ class Object is also { return @methods; } + method not() { + return !?self; + } } + # vim: ft=perl6 -- 1.5.4.3
>From 70b3210c52bc85c1539ca26541b159cec21a8b55 Mon Sep 17 00:00:00 2001 From: Fernando Correa de Oliveira <fernandocor...@gmail.com> Date: Mon, 29 Jun 2009 04:07:01 -0300 Subject: [PATCH] sign method added to Num class --- src/setting/Num.pm | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/setting/Num.pm b/src/setting/Num.pm index 157d18f..338656b 100644 --- a/src/setting/Num.pm +++ b/src/setting/Num.pm @@ -256,4 +256,8 @@ class Num is also { }; self!from-radians($r, $base) } + + our Int multi method sign ( Num $x: ) is export { + return $x <=> 0; + } } -- 1.5.4.3