On 26/06/07, Robert May wrote: > On 26/06/07, Glenn Linderman wrote: > > On 6/26/2007 10:57 AM, Perl Rob wrote: > > > > > I'm using Win32::GUI::BitmapInline and I have just one problem with > > > it: the requirement that my script have write access to the current > > > directory. > > Indeed. If you were to implement a solution that worked generally, > then we could apply it to the core distribution, and everyone could > benefit. (There's an outstanding bug report about this)
That's tracker number: 1586643 http://sourceforge.net/tracker/index.php?func=detail&aid=1586643&group_id=16572&atid=116572 > Personally I'd use File::Temp if it is installed on the users system, > falling back to the current directory (or perhaps $ENV{TEMP} or > $ENV{TMP} if they exist). File::Temp goes to a lot of trouble to find > a writable directory in a suitable (system specific) tmp location. Turns out File::Temp is only in the Core Perl distribution since 5.8.? an d we need a solution that works with 5.6.1 So I'm using File::Spec->tmpdir() to get a writable tmp directory. While I'm at it I'm going to make the module thread-safe (it's currently possible to use it from 2 threads, and get the same tmp filename in each case - that would cause problems. I'll also add some tests. I've got a trial version available - anyone interested in having a copy and trying it out - I've only got very limited access to machines where I don't have write permissions in all the directories? If so, drop me a note. > > On the other hand, if it is possible to avoid writing the temporary > > file, that would be an even better solution. I think it would be, > > although I haven't figured out all the details. > > It's certainly doable, but significantly harder - it'd require some XS > stuff to be written either in Win32::GUI::Bitmap or > Win32::GUI::BitmapInline. I keep forgetting that we have Win32::GUI::DIBitmap in the distribution now. What do people think about the overhead of pulling in Win32::GUI::DIBitmap in order to avoid having to write a temporary file? Regards, Rob. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users http://perl-win32-gui.sourceforge.net/