From: Konovalov, V. <vko...@sp...> - 2003-11-12 07:06:49
|
> As a consequence, to achieve a startup time of 4s, I had to > get rid of that > module and do the job another way. I used this library to get > the path in > which the script is executed, so my "new method" to do that > is a - very > simple - use of the variable $0 : > "use File::Basename qw(basename dirname); > my $path; > $it_is_a_pocket_pc = 0; > if ($0 =~ /^\\/ && $^O eq "MSWin32") Better use core function Win32::GetOSVersion (you do not need to "use Win32 for it) Please see perldoc Win32, and ID for WinCE is 3. > { $path = dirname($0)."\\"; > $it_is_a_pocket_pc = 1; > }" > > Thanks again for your help! > madfrog > > PS: I think it would be a great improvement if glob could > work directly, > without the need to import it from module, because it would > increase the > portability of perl scripts between PC and Pocket PC. Indeed, but here's a problem with taking a decision how much efforts could be spent on WinCE platform: tomorrow those will be much more capable devices, and even using glob from module will be quite okay. > > PS2: I'm just curious: where did you get your Tcl/Tk dlls? I > can't find > them! elder Tcl/Tk I downloaded from Rainer Keuchel's site, I have a link to it from perlce.sf.net Newer one I built by myself, so I use my own binaries. Also I started "tcltkce" project on SF, but still did not concluded what I planned to. I hope I'll do something useful to both those projects, and may be even join them together somehow -- I will see what can I do. Best regards, Vadim. |