On Tue, 26 Mar 2002, Andrew O'Brien wrote:

> On Mon, Mar 25, 2002 at 10:15:00PM +0000, Earwig wrote:
> 
> >   Do objects from outisde modules normally leave residue in the web server
> > process?  Is this just a problem with this module?  Is there some way I
> > can make sure the object is dead and gone by the end of the web page?
> 
> Is there a reason that merely umounting the share and then undef'ing
> the object doesn't work?
> 
> If you're mounting a share, browsing it and then unmounting it again
> every time someone uses this page then that is ouchy, performance-wise.

  I'm not mounting.  Filesys::SmbClient appears to make a fresh SMB
connection each time one of its methods (open, opendir, unlink, mkdir,
etc) is called.  Running outside of Apache/Embperl, I have no problem with
it.  But inside, it is somehow recalling the file descriptor and the fact
that it connected successfully before.

  Here's a condensed version of my code... the form page sends
user_id, passwd and server_name, then this tries to simply open a share to
authenticate the user.


[$var $smb $fd $server_name $user_id $passwd $]

[-
use Filesys::SmbClient;
$smb = new Filesys::SmbClient(username => "$user_id}", password =>
"$passwd", workgroup => "WORKGROUP", debug => 10);

$fd = $smb->opendir('smb://'.$server_name.'/'.$user_id.'$');
-]

[$if ($fd=0) $]

Success!

[$else$]

Failure!

[$endif$]

[-
$smb->closedir($fd);
undef $smb;
-]



  I apologize that this is straying into the topic of this specific
module, but I'm very interested to learn why this object is leaving
residue.


Lars


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to