Hello Stas,

Wednesday, November 05, 2003, 3:11:21 PM, you wrote:

SB> Is it possible that you import functions with the same name from different
SB> modules into the same script? If not, you really need to show us some *very* 
SB> short examples of your code so we can get the idea what your problem is.

Substituted functions is not in modules, but in scripts.
we have /cgi-bin/chat.cgi
----------------------------------------------------------------
#!/usr/bin/perl -w

use strict;
use CGI::Apache qw/:standard/;
use Apache::DBI;
use CGI::Cookie;

use lib qw (.);
use My::Config();
use My::Chat qw(:all);

use vars qw(%cfg);
*cfg = \%My::Config::cfg;

use vars qw($q);

$q = new CGI;

if($q->param('action') eq 'login')
  {
         &login;
  }
  .
  .
else
  {
        &print_login();
  }

sub print_login
  {
     ...........
  }
----------------------------------------------------------------


/perl/CMS.cgi
----------------------------------------------------------------
#!/usr/bin/perl -w

use strict;
use CGI qw/:standard/;
use CGI::Cookie;
use DBI;

use lib qw (.);
use CMS::Config();

use CMS::Tools;

use vars qw(%cfg);
*cfg = \%CMS::Config::cfg;

use vars qw($dbh $q);

$q = new CGI;

if ($q->param('action') eq 'login')
  {
    &login();
  }
.
.
.
else
  {
    &print_login();
  }

sub print_login
  {
     ...........
  }
----------------------------------------------------------------

So sometimes when I call CMS.cgi I can see result of print_login of
chat.cgi and and vice versa.

-------------------------------------------
Sincerely yours,
Andrey A. Kudrin,



-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html

Reply via email to