codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Perl Compilation error with Class::MethodMaker  perl_sucks at 09:35 on Thursday, May 28, 2009
 

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!








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  Perl Compilation error with Class::MethodMaker
•  finding the status of a service in windows
•  Javascript help
•  C and C++ challenges
•  Re: Creating a file in a different directory...
•  Auto Populating Lists
•  Unable to display ALL selections from Checkboxlist
•  dropdown list for country,state and city
•  split file column wise


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2009