Re: Use works but require does not!
On Fri, 8 Jul 2005 12:05:08 -0700, you wrote: >Why does the use find the file and the require does not? > >The Win32.pm is located in, C:\Perl\lib\Win32.pm > >Can't locate Win32::OLE qw(in with) in @INC (@INC contains: >/package0/filpods/loaders . C:\Program Files\ActiveState Komodo >3.1\dbgp\perllib C:\perl\lib C:\perl\site\lib C:\Program >Files\ActiveState Perl Dev Kit 6.0\lib\ C:/Perl/lib C:/Perl/site/lib) at >Y:\FILPODS\DB\loaders\factsheet_extract.pl line 30. > >Code example cause error: > >$win32ole = 'Win32::OLE qw(in with)'; >$winconst = "Win32::OLE::Const 'Microsoft Outlook'"; > >if ($^O eq 'MSWin32'){ > require $win32ole; > require $winconst; > $Win32::OLE::Warn = 3; # die on errors... >} There are two problems: 1) When you pass a string to use or require, Perl expects a file path, not the :: format. 2) The arguments after the module name are not processed by require when you pass a string. The simplest fix is eval "require $win32ole"; If this code will be executed many times in a single run of the program, a better way would be $win32ole = 'Win32/OLE.pm'; # extension is required too! require $win32ole; Win32::OLE->import('in', 'with'); All this obviously applies to the Win32::OLE::Const as well. -- Eric Amick Columbia, MD ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: CPAN on win32 - 'test' is not recognized
On Sat, 9 Jul 2005, andrew Black wrote: > Hi > I am trying to run CPAN.pm on Win32 with the following errors > > >CPAN.pm: Going to build S/SB/SBURKE/File-HomeDir-0.06.tar.gz > > Checking if your kit is complete... > Looks good > Writing Makefile for File::HomeDir > -- OK > Running make test > 'test' is not recognized as an internal or external command, > operable program or batch file. > test -- NOT OK > Running make install >make test had returned bad status, won't install without force It sounds like the tests use the unix "test" command, which normally isn't available under Win32. -- best regards, randy kobes ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: DBD-MySQL and fork
At 05:46 PM 7/9/05 +0200, [EMAIL PROTECTED] wrote: >But DBD-MySQL doesn't seem to work 100 % correct with fork because Windows >reports an error with perl and kills it. This seems to occur at random. >Sometimes it happens after 100 updates, sometimes after 1000 or even 1 >updates. I experienced a similar problem with Open3(), perl would crash at random. Apparently there is something unstable about Windows's forking mechanism (actually I don't think it truly forks). I never found a solution to that, I just ran large numbers of processes so that the task would finish even with an ultra high mortality rate. I had a similar MySQL project where I had to drastically speed things up over one process. I did it by having multiple independent processes. I had a scheduled task which fired off a shell script which launched 10-15 copies of the script per machine. MySQL was smokin off the rails. If ur crashing problem is fork related that should get around it. -- REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=-- "...ne cede males" 0100 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
DBD-MySQL and fork
Hello there, i'm using DBD-MySQL to make lots of updates of a MySQL-Database. To speed up things I've had the idea to create threads using fork. This REALLY SPED UP things - my application finished 10 times faster due those synchronous updates! But DBD-MySQL doesn't seem to work 100 % correct with fork because Windows reports an error with perl and kills it. This seems to occur at random. Sometimes it happens after 100 updates, sometimes after 1000 or even 1 updates. Is this a bug? Does anyone know if and when to expect a fix for it? Is there a workaround? For any help - thanks in advance! Harry ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Using canned subroutines with includes - an answer of sorts
Memory failing? Probably, along with everything else...:0) Thanks for your help... Douglass N. Loud President Integrated Information Systems, Inc. 292 Fifth Avenue New York, NY 10001 212-714-3522 (office) 203-952-7108 (cell) [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of $Bill Luebkert Sent: Friday, July 08, 2005 5:49 PM To: Perl-Win32-Users@listserv.ActiveState.com Subject: Re: Using canned subroutines with includes - an answer of sorts Joe Discenza wrote: > Doug Loud wrote, on Fri 7/8/2005 12:17 > ** > > *: *in Windows XP Pro, SP2, I have to use: > : > : require 'includes/28ESP.pl'; > : > : But in the *NIX days, I used: > : > : require "../includes/28ESP.pl"; > > Are you sure that isn't > > require "./includes/28ESP.pl"; > > ? Because the double-dot means *go up* a level, then come down in the > includes directory; so that implies that includes is a sibling > directory to the current one. The single-dot means than includes is a > child of the current directory. Exactly - Doug's memory seems to be failing him. ;) -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/-' /___/_<_http://dbecoll.tripod.com/ (My Perl/Lakers stuff) ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
CPAN on win32 - 'test' is not recognized
Hi I am trying to run CPAN.pm on Win32 with the following errors CPAN.pm: Going to build S/SB/SBURKE/File-HomeDir-0.06.tar.gz Checking if your kit is complete... Looks good Writing Makefile for File::HomeDir -- OK Running make test 'test' is not recognized as an internal or external command, operable program or batch file. test -- NOT OK Running make install make test had returned bad status, won't install without force ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs