> Okay, so we're back to my other suggestion -- "require" it:
> 
>     {
>         $script = get_name_of_script(); # names matter! pick good ones!
>         $output = require $script or
>             die "Couldn't 'require' $script\n$!\n";
>         do_something($output);
>     }
> 

No I cant use require. Let me tell you why.
The actual application sits inside Mailscanner Daemon on the SMTP
server.
Depending on the email recipient , I wish to call a particular ruleset
which is stored in the user specific perl file.
There may be thousand diff email recipients with different users

for eg 

{ 
   $recipient = "[EMAIL PROTECTED]";  # This will come from the MTA 
   $scriptname = get_scriptname($recipient);
   
   # if I do require here 
    require "$scriptname";

    # HERE LIES THE PROBLEM 
    somefunc($arg1,$arg2,$arg3)    # somefunc is defined in $scriptname

} 

now for the next mail , the main process remains same so somefunc is
already defined. If $scriptname is different I will require a new perl
file with the same function somefunc() .. is that OK.

Also I cannot go on requiring files again and again, my process will hog
all the memory then. 


Thanks
Ram



----------------------------------------------------------
Netcore Solutions Pvt. Ltd.
Website:  http://www.netcore.co.in
Spamtraps: http://cleanmail.netcore.co.in/directory.html
----------------------------------------------------------

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to