Hi all, Say I have 2 modules ( below pseudo codes ) , which the first package ( InitGlobal ) will be used through out the other project modules. However, InitGlobal itself would relay on some other modules, which the modules using InitGlobal too.
This sometimes caused some weir problem, or perhaps it just runable with luck. So I have to fix it one by on with to cutting some shareable code to another .pl file with require() to call them, but sound quite terrible enough. Not sure how do Perl handle this, or is that any standard way for module inter-relay ( or Is that any formal term to call this ? ) Any pointers are greatly appreciate. Thank you very much, Mug ============================================ package InitGlobal ; use strict; use LocalePrint ; sub GetVars { .......... } sub PhaseError { shift ; LocalePrint @_ ; } sub Build { # add something to %ENV; bless {} } 1; __END__ package LocalePrint ; use strict; use InitGlobal ; .... exported LocalePrint ... ...... our $gvar = InitGlobal::Build ; sub LocalePrint { my %vars = gvar -> GetVars ( @_ ); my $remote = $ENV{REMOTE_ADDR} ; if ( $remote ) { # CGI mode if ( $remote eq $localhost ) { # using %vars # return error details } else { # not admin on localhost # using %vars # write sys log; # return friendly message; } } else { # using %vars # return shell message } } 1; __END__ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>