in reply to Why this problem in MethodMaker ?
Hi Vishi !!!
I beleive that you have not done enogh debugging before posting your code regarding MethodMaker.
As per the MethodMaker logic you can pass only one arguement for the functions defined using MethodMaker.
For example look at the following line :- my $result = $pObj->add(100,3); Inside the child class you are calling add with 2 args. But If you try print @_ variable inside add function which is defined in Parent Clss you will get only 100 not the 3.
So I advise you to understand that logic first why that is happening in Parent Class.
where as in Subtract which is defined in Parent Class you are calling with only one arguemnt which is very accurate for MethodMaker Class.
That gets wrong when you call add.
good work anyway ....
|
|---|