From: Jamie C. <jca...@we...> - 2001-06-19 23:44:51
|
Curtis Doty wrote: > > >> I seem to have recently acquired a bug where I cannot do a remote url > >> install of a module. > >> > >> So anyway, miniserv.pl is still hanging. Endless hourglass when > >I attempt to > >> install a module from local or remote source. It looks like > >miniserv.pl is > >> spinning and enlessly spawning rm, over and over. Any ideas on > >how to debug? > > > >Odd .. what module were you trying to remotely install? > > I've figured it out. This problem stems from an earlier patch I submitted to > Jamie that overloads stat with objects via the File::stat module. (I prefer > $foo->mtime to $foo[4].) Anyways, what happened was inside &tempname() where > it never exited the while(1) loop because the array was actually an object > an thus it was never seeing the permissions it expected to see. > > I've updated the patch to use File::stat without overloading, and the > problem went away. That module is part of the standard perl distribution so > I can only hope Jamie will consider it. I'm a bit reluctant to use perl modules when there is already a built-in function for doing the same thing, in order to cut down on load time and to make it easier for people to run webmin on stripped-down versions of perl. > However &tmpname() still needed some serious help, so I rewrote it. Some of > it is shamelessly swiped from the FAQ. ;) Attached is the patch. Your patch basically does the same thing as the existing tempname() function, just using File::stat right (apart from removing all my hard-coded uses of /tmp :-) - Jamie |