Hello Stas,
Wednesday, November 05, 2003, 4:54:01 AM, you wrote:
I have a mod_perl driven website and CMS for this site running under PerlRun. Site and CMS located in different direcories and use different modules, but have subroutines that have the same names.From some moment site become to use subroutines from CMS, what'swrong?
SB> Most likely are you being bitten by this dog: SB> http://perl.apache.org/docs/1.0/guide/porting.html#Name_collisions_with_Modules_and_libs
Yes, I have modules with the same name, but in different dyrecories declared as different packages. The structure looks like this: cgi-bin | |-My | |-Chat.pm | |-Config.pm | |-site.pl perl | |-CMS | |-Chat.pm | |-Config.pm | |-CMS.pl
In cgi-bin I have mod_perl driven main site, under CMS - CMS scripts under PerlRun. All modules in My declared as packages My::Package (e.g.My::Chat, My::Config) and in CMS as CMS::Package. And ofcourse they used in scripts only as 'use My::Package'. As I suppose My::Chat.pm and CMS::Chat.pm can't be identificated as one module in this situation. Am I wrong? Is there some clear solution without renaming modules?
As long as you are using My::Chat and CMS::Chat, you won't have this particular problem. If you push My/ and CMS/ into @INC and use Chat, then you certainly will. If I understand correctly you do use My::Chat and CMS::Chat.
Is it possible that you import functions with the same name from different modules into the same script? If not, you really need to show us some *very* short examples of your code so we can get the idea what your problem is.
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
-- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html