Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
thanks in advance for your answers novicemy_prog.pl ---------- use A use B if <arg1> { A.just_print("hi") }else if <arg2> { B.just_print("hello") } sub main_print(){ print @_; } A.pm ---- package A sub just_print(){ print @_; main::main_print(); <-- error } B.pm ---- package B sub just_print(){ print @_; main::main_print(); <-- error }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: calling functions with same names but in different modules depending on user input
by merlyn (Sage) on May 06, 2004 at 15:05 UTC | |
by Anonymous Monk on May 06, 2004 at 18:18 UTC | |
|
Re: calling functions with same names but in different modules depending on user input
by blue_cowdawg (Monsignor) on May 06, 2004 at 15:29 UTC | |
|
Re: calling functions with same names but in different modules depending on user input
by Fletch (Bishop) on May 06, 2004 at 15:11 UTC | |
|
Re: calling functions with same names but in different modules depending on user input
by itub (Priest) on May 06, 2004 at 15:10 UTC | |
|
Re: calling functions with same names but in different modules depending on user input
by Anonymous Monk on May 07, 2004 at 07:23 UTC |