Hi,
I would like to replace parent function (Somefunc) in child class, so when I call Main procedure it should fail.
Is it possible in Perl?
Code:
package Test;
use strict;
use warnings;
sub Main()
{
SomeFunc() or die "Somefunc returned 0";
}
sub SomeFunc()
{
return 1;
}
package Test2;
use strict;
use warnings;
our @ISA = ("Test");
sub SomeFunc()
{
return 0;
}
package main;
Test2->Main();