Subject: | Unable to declare sub assert virtual |
I experienced this problem with Class::Virtual 0.04
Perl:
This is perl, v5.8.1-RC3 built for darwin-thread-multi-2level
(with 1 registered patch, see perl -V for more detail)
On OS X:
Darwin hyperstation.local 7.3.0 Darwin Kernel Version 7.3.0: Fri Mar 5 14:22:55 PST 2004; root:xnu/xnu-517.3.15.obj~4/RELEASE_PPC Power Macintosh powerpc
I try to build an abstract class with should defined the function assert as virtual.
use base qw(Class::Virtually::Abstract);
__PACKAGE__->virtual_methods(qw(init assert proces finish fail));
And I get the following warning:
Workflow::Step::Abstract attempted to declare assert() virtual but it appears to already be implemented! at lib/Fresch/MailToCustomer.pm line 8
Apparently the assert method imported into Class::Virtual from Carp::Assert makes some noice.
Exchanging assert for Carp::Assert's affirm gives the same result:
Workflow::Step::Abstract attempted to declare affirm() virtual but it appears to already be implemented! at lib/Fresch/MailToCustomer.pm line 8
I cannot think of an imidiate work-around, but perhaps it should go in the Caveats section.