Subject: | Class t::Parent::Child fails to inherit from t/Parent.pm |
Under Object::InsideOut, r1.29, inheritance mechanism fails when
*) parent is defined in an external file, e.g., t/Parent.pm.
and
*) name of parent class IS the leading substring of name of
child class
For example,
t::Parent
t::Parent::Child
The workaround for the class writer is to use the parent explicitely,
e.g.,
package t::Parent::Child {
use t::Parent;
use Object::InsideOut qw( t::Parent );
}
However, your documentation (and the code in sub import) imply that
you intended "use Object::InsideOut qw( t::Parent );" to be a drop-in
replacement for "use base qw( t::Parent );".
Attached tar.gz file includes a patch in the form of a diff -u against
Object/InsideOut.pm, r1.29 (file InsideOut.pm.diff), as well as eight
test cases.
Please see comments at the top of each test case. The main test case
is t/22-external_leading_parent.t. This case highlights the bug. The
other cases check that the patch does not break anything.
This is perl, v5.8.4 built for i686-linux-thread-multi
Linux coitlx05 2.4.21-27.8.1.ELhugemem #1 SMP Sat Apr 16 17:59:19 EDT
2005 i686
Thank you.
Subject: | OIO_patch_n_tests.tar.gz |
Message body not shown because it is not plain text.