|
Hi all,
I face a weird problem and I wish to sort that out. This is quite urgent. Please help.
I have two modules. I call them Men.pm and Women.pm (my boss wrote these and wants me to fix the errors. So understand the urgency).
The modules have a circular dependency.
Both the modules use Class::MethodMaker as follows for the obvious reasons:
use Class::MethodMaker
'new_with_init' => "new" ,
'new_hash_init' => "_hash_init" ,
'get_set' => [ qw( ) ]
Since the modules are circulary dependent, the compilation of the modules with
perl -wc Men.pm aborts with the following error:
The component 'new' has already been installed in class -->Men<-- as a HASH(0xa102264)
(this time a new)
at /usr/local/lib/perl5/5.8.6/i86pc-solaris/Class/MethodMaker.pm line 20
BEGIN failed--compilation aborted at Men.pm line 145
What I want to know is, The compilation of modules with circular dependencies throws subroutine 'XXX' redefined errors but says 'Men.pm syntax ok' when I do not use Class::MethodMaker.
But the compilation get aborted with Class::MethodMaker.
Please explain me the part played by Class::MethodMAker in the failure?
Thanks in advance!
<Added>
Hi all,
I face a weird problem and I wish to sort that out. This is quite urgent. Please help.
I have two modules. I call them Men.pm and Women.pm/
The modules have a circular dependency.
Both the modules use Class::MethodMaker as follows for the obvious reasons:
use Class::MethodMaker
'new_with_init' => "new" ,
'new_hash_init' => "_hash_init" ,
'get_set' => [ qw( ) ]
Since the modules are circulary dependent, the compilation of the modules with
perl -wc Men.pm aborts with the following error:
The component 'new' has already been installed in class -->Men<-- as a HASH(0xa102264)
(this time a new)
at /usr/local/lib/perl5/5.8.6/i86pc-solaris/Class/MethodMaker.pm line 20
BEGIN failed--compilation aborted at Men.pm line 145
What I want to know is, The compilation of modules with circular dependencies throws subroutine 'XXX' redefined errors but says 'Men.pm syntax ok' when I do not use Class::MethodMaker.
But the compilation get aborted with Class::MethodMaker.
Please explain me the part played by Class::MethodMAker in the failure?
Thanks in advance!
|
|
|
|
|
|
|
// |