Re: Regex

2005-09-27 Thread robert johnson



David Budd wrote:
I thought this was working, but my logs just showed a case where it 
seems not to do what I want.

Why does:
$OK_body=($body=~/library\s*?card\D*?(\d{7})\D/i) ;
Not become true when $body contains:
Library Card: 0240742



i'd bet that it passes when you have some whitespace after the number
and fails when it doesn't.  thats a common problem and can be hard to trace.

in any event, your ending \D *requires* a non-digit character to
immediately follow the number.  since your example failed, it must be
terminating the line.  adding a ? or * to the \D will not behave as (I
believe) you intend, i.e. it will not filter out numbers with 8 or more
digits

so IF your string always terminates the line (with or without
whitespace), this will require exactly seven digits and not care whether
or not whitespace follows:

 $OK_body = ($body =~ /library\s*card\s*:?\s*(\d{7})\s*$/i)

However...  if the "library card: #" string does not always terminate
the line and/or if you need to allow the possibility of non-digit
characters immediately after the 7-digit number (example, library card:
1234567MORE_STUFF), then you will need to use a word boundary:

 $OK_body = ($body =~ /library\s*card\s*:?\s*(\d{7})\D*\b/i)

and by the way,  *? is redundant.
* means zero or more.
? means zero or one.

--rob

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Perl system calls wont work on Win98? help!

2005-07-26 Thread robert johnson


--- Chris Wagner <[EMAIL PROTECTED]> wrote:

> I'm on 98SE and it seems to work OK for me.  Are u sure ur program is
> printing to STDOUT and not STDERR?
> 

i've actually got STDERR redirected to a textfile, and the only thing that ever
gets sent to it is the "terminating program" message when I CTRL-C break the
program.


> C:\WINDOWS\Desktop>perl
> $a = `hostname`;
> print $a;
> 
> attic
> 
> C:\WINDOWS\Desktop>perl
> $a = system("hostname");
> print $a;
> 
> attic
> 0
> C:\WINDOWS\Desktop>
> 

yeah, i always get the zero (0) value from the successful system call assigned
to my variable.  but i dont get the printout to the screen from the system call
itself.   and i know the C program is just printing to STDOUT through the
standard "printf" command.   

whats worse is that i also have the C program writing to a file...  the write
occurs when i run the C-executable alone, or when i call it via any Perl method
on a WinXP machine...  but the file write ("fwritef") doesnt even occur when i
call the executable from any Perl method on a Win98 machine.  

-robert


> At 08:00 PM 7/26/05 -0700, robert wrote:
> >but when i call this executable from Perl on a Win98 system, it will not
> assign
> >the resulting output at all.  it wont even print it to the screen.  
> >
> >ive tried a number of methods:
> >
> >   $result=system("myprogram.exe $arguments");
> >   print " found:  [$result]\n";
> >
> >or
> >
> >   $result=`myprogram.exe $arguments`;
> >   print " found:  [$result]\n";
> >
> 
> 
> 
> 
> --
> 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
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: send output to a parallel port?

2005-07-22 Thread robert johnson
um... sorry Ken, you are absolutely right.  

my WinXP does not allow writes to the IO port.  It does on 98, and i mistakenly
thought it was working on XP as well.

technically, I only need this to work on the manufacturing's Win98 machines,
and now methinks the working C-code might be just fine after all.  

But i would like to get it to work on my XP box, so i can use this function
remotely from home.  your link will be very helpful in doing that.  

thanks  :)


--- like a durn fool, i wrote:

> 
> 
> > -Original Message-
> > From: Ken Cornetet
> > 
> > Writing to an IO port from a user program isn't allowed under 
> > NT/2k/XP.
> > 
> > To do this you need some sort of driver.
> > 
> > Check out http://www.winfordeng.com/products/portio32/#samples
>  
> 
> well somehow the single line of C code
> 
>   outp(0x378,state)
> 
> writes to the parallel port on any of our Win98 and WinXP machines.  the
> single line of C is compiled all by itself (with the  header of
> course) 
> 
> perhaps there is some sort of driver installed allowing this low level
> access, but it is transparent to the above C code.  
> 
> anyhow, my thought is that Perl would have a similar ability.
> 
> (BTW, I searched all network drives and my local drive for the example
> "portio32.dll", but found nothing.)
> 
> ___
> Perl-Win32-Users mailing list
> Perl-Win32-Users@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 





Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: can't redirect STDERR

2005-06-18 Thread robert johnson


Glenn Linderman wrote:
> 
> On approximately 6/17/2005 10:29 PM, came the following 
> characters from 
> the keyboard of robert johnson:
> > perl 5.8.6 on Win32
> > 
> > i need to redirect STDERR, in order to parse runtime information
from 
> > a flash programmer.  the program "monice.exe" runs on either 
> > Win98/XP/2000 just fine, but the command i'm using to redirect
STDERR 
> > does not work on Win98
> 
> What makes you think Win9x even has the concept of STDERR?  

unwitting optimism?

> > anyone know a way around this?   any help will be much appreciated,
as
> > this is going to be a big PIMA real quick when manufacturing (and 
> > their crappy win98 machines) get held up.
> 
> A wrapper program that opens the handles as desired, and then exec's 
> monice.exe ?

like in C?  im not sure what you mean.



___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


can't redirect STDERR

2005-06-17 Thread robert johnson
perl 5.8.6 on Win32

i need to redirect STDERR, in order to parse runtime information from a
flash programmer.  the program "monice.exe" runs on either Win98/XP/2000
just fine, but the command i'm using to redirect STDERR does not work on
Win98

heres the offending line in my Perl script:

$pid = open
(PH, "\"C:\\Program Files\\EPITools\\edta22a\\bin\\monice.exe\" 
-vIXP420 -d 192.168.100.251:e < auto_flash.cmd 2>stderr.txt |") 
or die "couldn't fork! $!\n";

note:  -v and -d switches are particular to the monice.exe, and the
auto_flash.cmd is sent to the monice.exe to auto select specific
text-menu options.  there is no issue with any of this.  the problem
(but only on Win98) is with "2>stderr.txt".

now, "2" is supposedly the file descriptor for STDERR.  as ive already
mentioned, it does correctly redirect STDERR to the appropriate text
file in winXP/2000, but not win98.

on Win98 it complains: 'Cant find file "2" specified on command line',
then continues to run the "monice.exe" executable as expected, but dumps
all STDERR to the terminal window (the default behavior), and so my
program doesnt work worth a hoot.

anyone know a way around this?   any help will be much appreciated, as
this is going to be a big PIMA real quick when manufacturing (and their
crappy win98 machines) get held up.

thanks, robert

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Win32::SerialPort collecting data stream

2005-05-13 Thread robert johnson
i just can't get this figured out.

i have a device, that reports ascii data via a typical (DB-9) serial port.  i
set up Win32::SerialPort in the following method:

$comm = Win32::SerialPort->new($port) or die "Close any application using
$port\n";
$comm->baudrate($baud); $comm->databits($dbits);
$comm->stopbits($sbits); $comm->parity($parity);


the following code works, but only for a relatively small amount of data
  
$comm->lookclear;
$comm->write("rl\r");  
sleep 10;
$rcvd=$comm->input;
(... and then write $rcvd to a file ...)

for ~3K worth of serial data or less, $rcvd contains what i expect it to.  but
when there is a larger amount, say 7-8K of serial data, the variable $rcvd is
empty.  and my typical application could have excess of 100K

id really prefer to send the received data from the device directly to a file,
rather than thru a temporary variable.  obviuosly "input" is not the right
command, but im having a hard time figuring out what else to do.

thank you for any help

rob




--Rob

Programmers have been likened to modern day Sorcerers.  Well, I'm the Mickey 
Mouse apprentice who spawned an infinite number of zombie broom processes, and 
got in big trouble when the Sorcerer came back.

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Perl.Net, PerlApp fail building executable in activestate PDK on windows

2005-05-07 Thread robert johnson
sorry for the crossposting, but all these lists could be appropriate.  please
correct me in your reply as needed.

i just installed activestate PDK (with Perl.Net, PerlApp, etc) here at home.  i
cant get any perl executables to build.  (I have been successfully using it at
work though.)  In both cases i use WinXP and have the basic MSVS and MS .NET
framework installed.  

now i have a relatively simple script that causes Perl App to crash, and
Perl.Net to complain loudly.

in Perl.NET, it does the following upon attemping "Make Target"

Can't locate strict.pm in @INC (@INC contains: .) at /PerlApp/PerlNET.pm line
8.
BEGIN failed--compilation aborted at /PerlApp/PerlNET.pm line 8.
BEGIN failed--compilation aborted at (eval 1) line 235.
BEGIN failed--compilation aborted at -e line 6.
System.ApplicationException: Couldn't create Perl interpreter



when i try to build it in PERL APP:

pdkcheck.exe crashes and gives the "needs to close, sorry mate, wanna send MS
an anonymous error report?" window.

heres the basics of the error report:

AppName: pdkcheck.exeAppVer: 6.0.1.7918  ModName: ntdll.dll
ModVer: 5.1.2600.2180Offset: 00018fea


can someone help me please?  i don't know what to do.  the script that i am
trying to build into an executable works just fine from the command line.

thanks



--Rob

Programmers have been likened to modern day Sorcerers.  Well, I'm the Mickey 
Mouse apprentice who spawned an infinite number of zombie broom processes, and 
got in big trouble when the Sorcerer came back.



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: SerialPort problems -- cygwin / win32 / *nix

2005-05-06 Thread robert johnson

--- Sisyphus wrote:
> 
> Robert Johnson wrote:
> >
> > Installing /usr/lib/perl5/site_perl/5.8/cygwin/auto/Win32/API/API.dll
> > Installing /usr/lib/perl5/site_perl/5.8/cygwin/auto/Win32/API/libAPI.dll.a
> > Files found in blib/arch: installing files in blib/lib into architecture
> > dependent library tree
> > Writing /usr/lib/perl5/site_perl/5.8/cygwin/auto/Win32/API/.packlist
> > Appending installation info to /usr/lib/perl5/5.8/cygwin/perllocal.pod
> >
> 
> I don't see any mention of  API.pm having been installed ? I'm not really
> sure about Cygwin's perl directory structure - I think you should at least
> have the file X/Win32/API.pm where 'X' denotes one of the @INC directories
> (probably '/usr/lib/perl5/site_perl/5.8/cygwin/').

it is there, but it is the old one, not the one im trying to update to.

   [EMAIL PROTECTED] /usr/lib/perl5/site_perl/5.8/cygwin/Win32
   $ ls -ltr
   -r--r--r--  1 RJohnson mkgroup-l-d 15018 Feb 11  2002 API.pm

> 
> Instead of running:
> $ perl t/test.t
> try:
> $ perl -Mblib t/test.t

that works.  it no longer segfaults, and also prints my "print $lpbuffer line":

   [EMAIL PROTECTED] ~/Win32-API-0.21
   $ perl -Mblib t/test.t
   1..2
   ok 1
   ok 2
   lpbuffer = c:\DOCUME~\RJohnson\LOCALS~\Temp\

make install still does the exact same thing as reported above.

but your simple test script to test the use Win32::API still segfaults with a
coredump.

and the original problem, Win32::SerialPort still dies on all tests
(coredumps).  you suggest its probably not finding the (correct?) Win32 API.  I
dont know why its not installing the API.pm  i can't just copy the new
API.pm into that directory can i?

just for the record, here is my perl -V return.  maybe theres something
obviously wrong in my setup, that im not aware of?

-
Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
  Platform:
osname=cygwin, osvers=1.5.12(0.11642), archname=cygwin-thread-multi-64int
uname='cygwin_nt-4.0 loreley 1.5.12(0.11642) 2004-11-10 08:34 i686 unknown
unknown cygwin '
config_args='-de -Dmksymlinks -Duse64bitint -Dusethreads -Doptimize=-O3
-Dman3ext=3pm'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=undef uselongdouble=undef
usemymalloc=y, bincompat5005=undef
  Compiler:
cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe
-I/usr/local/include',
optimize='-O3',
cppflags='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe
-I/usr/local/include'
ccversion='', gccversion='3.4.1 (cygming special)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, prototype=define
  Linker and Libraries:
ld='ld2', ldflags =' -s -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib /lib
libs=-lgdbm -ldb -lcrypt -lgdbm_compat
perllibs=-lcrypt -lgdbm_compat
libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=libperl.a
gnulibc_version=''
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' -s'
cccdlflags=' ', lddlflags=' -s -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: MULTIPLICITY USE_ITHREADS USE_64_BIT_INT
USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
  Built under cygwin
  Compiled at Jan 27 2005 11:10:54
  %ENV:
PERL5LIB="C:\Program Files\ActiveState Perl Dev Kit 6.0
Deployment\lib\;C:\Perl\lib;C:\Perl\site\lib"
CYGWIN=""
  @INC:
C
\Program Files\ActiveState Perl Dev Kit 6.0 Deployment\lib\;C
\Perl\lib;C
\Perl\site\lib
/usr/lib/perl5/5.8/cygwin
/usr/lib/perl5/5.8
/usr/lib/perl5/site_perl/5.8/cygwin
/usr/lib/perl5/site_perl/5.8
/usr/lib/perl5/site_perl/5.8
/usr/lib/perl5/vendor_perl/5.8/cygwin
/usr/lib/perl5/vendor_perl/5.8
/usr/lib/perl5/vendor_perl/5.8
.




__ 
Yahoo! Mail Mobile 
Take Yahoo! Mail with you! Check email on your mobile phone. 
http://mobile.yahoo.com/learn/mail 
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: SerialPort problems -- cygwin / win32 / *nix

2005-05-05 Thread robert johnson

--- Sisyphus wrote:
> 
> - Original Message - 
> From: "robert johnson" 
> 
> >
> > youre right.  during the make there were several warnings.
> >
> > API.c: In function `XS_Win32__API_LoadLibrary':
> > API.c:90: warning: cast from pointer to integer of different size
> > API.c: In function `XS_Win32__API_GetProcAddress':
> > API.c:102: warning: cast to pointer from integer of different size
> > API.c: In function `XS_Win32__API_FreeLibrary':
> > API.c:121: warning: cast to pointer from integer of different size
> > API.xs: In function `XS_Win32__API_PointerAt':
> > API.xs:171: warning: cast to pointer from integer of different size
> > API.xs: In function `XS_Win32__API_Call':
> > API.xs:217: warning: cast to pointer from integer of different size
> >
> 
> They shouldn't matter.
> 
> > and it failed 1 out of 2 tests.
> > t/testFAILED test 2
> >
> 
> I think that might just be a poorly constructed test (also note that there's
> no segfault during the running of the tests - which is a good sign.)
> 
> In test.t, at the very last line, change /TEMP/, to /TEMP/i . Hopefully that
> will then pass the test. In any case, have test.t print out $lpbuffer so
> that you can see that it does in fact contain the name of the temporary
> directory.

ok, that fixes the test error, but its still not working.  Heres what Im doing:

perl Makefile.PL
writes the Makefile

make
seems to work okay, except for the warnings that i noted above.

make test
now it passes both tests, after modifying test.t as you suggested.  
BUT, it does not print $lpbuffer, even though i put a line to do so.
my entire line (print "lpbuffer: $lpbuffer\n";) is just ignored (?!)

make install
appears to install correctly.

Installing /usr/lib/perl5/site_perl/5.8/cygwin/auto/Win32/API/API.dll
Installing /usr/lib/perl5/site_perl/5.8/cygwin/auto/Win32/API/libAPI.dll.a
Files found in blib/arch: installing files in blib/lib into architecture
dependent library tree
Writing /usr/lib/perl5/site_perl/5.8/cygwin/auto/Win32/API/.packlist
Appending installation info to /usr/lib/perl5/5.8/cygwin/perllocal.pod

now when i run your simple test script, it still returns
Sementation Fault.  core dumped

and when i attempt to run the test.t in perl:
$ perl t/test.t 
1..2
Segmentation fault (core dumped)

i have no idea what to do.

thanks again,
rob





__ 
Yahoo! Mail Mobile 
Take Yahoo! Mail with you! Check email on your mobile phone. 
http://mobile.yahoo.com/learn/mail 
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: SerialPort problems -- cygwin / win32 / *nix

2005-05-04 Thread robert johnson

--- Sisyphus  wrote:
> 
> - Original Message - 
> From: "robert johnson"
> 
> >
> > Rob, Bill,
> >
> > Ive installed Risacher's patched Win32::API as Rob suggested, and tried
> > again to install Win32::SerialPort in my cygwin build.  however, it 
> > (Win:Ser) still fails all tests.
> >
> >[EMAIL PROTECTED] ~/SerialPort-0.19
> >$ perl test.pl
> >t/test1dubious
> >
> > Test returned status 0 (wstat 139, 0x8b)
> > test program seems to have generated a core
> >DIED. FAILED tests 1-275
> > Failed 275/275 tests, 0.00% okay
> >
> >(... ditto each test group ...)
> >
> >   Failed 7/7 test scripts, 0.00% okay. 1749/1749 subtests failed, 0.00%
> >
> > any suggestions?
> 
> I'm a little concerned that perhaps you didn't install Win32::API correctly.
> Can you confirm that you built and installed Win32::API by running (in
> succession):
> perl Makefie.PL
> make test
> make install

youre right.  during the make there were several warnings.

API.c: In function `XS_Win32__API_LoadLibrary':
API.c:90: warning: cast from pointer to integer of different size
API.c: In function `XS_Win32__API_GetProcAddress':
API.c:102: warning: cast to pointer from integer of different size
API.c: In function `XS_Win32__API_FreeLibrary':
API.c:121: warning: cast to pointer from integer of different size
API.xs: In function `XS_Win32__API_PointerAt':
API.xs:171: warning: cast to pointer from integer of different size
API.xs: In function `XS_Win32__API_Call':
API.xs:217: warning: cast to pointer from integer of different size

and it failed 1 out of 2 tests.
t/testFAILED test 2  

> Afaict, the first test in SerialPort test1.t simply tries to load
> Win32::SerialPort . and that "generated a core", which makes me suspect
> that there's something wrong with Win32::API.
> 
> As another check, does the following script simply print "done", and then
> exit:
> 
> use Win32::API;
> print "done\n";
> __END__

right again:  Sementation Fault.  core dumped.





Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: SerialPort problems -- cygwin / win32 / *nix

2005-05-04 Thread robert johnson

--- Sisyphus wrote:
> 
> - Original Message - 
> From: "robert johnson" 
> >
> > So, now my question becomes trivial.  How do I get Win32::SerialPort
> towork
> > under cygwin?  i tried installing this module but it dies miserably during
> the
> > make.  I therefore assumed it was incompatable with cygwin.  I've
> installed it
> > (win32:serial) and had it working just fine on my "normal" Windows perl
> build.
> > Sorry for all the hand-holding, I'm feeling pretty incompetent about now.
> >
> 
> Installing the module is just a matter of running 'perl install.pl' (on the
> version I have, at least). If that
> doesn't work then you could manually copy the 2 '.pm' files to the
> appropriate perl folder.
> 
> I expect the real problem will be that you don't have the prerequisite
> Win32::API - which used not to build straight out of the box on Cygwin, and
> I assume still doesn't. There is a version of Win32::API around somewhere
> that *does* build on Cygwin. I used to have it and may still do. See if you
> can Google it up - else, let me know, and I'll see if I can find it. (The
> only problem with Aldo's version of Win32::API is/was that the assembly code
> is/was written for MS compilers - and for Cygwin you need assembly code that
> gcc understands.)
> 

Rob, Bill,

Ive installed Risacher's patched Win32::API as Rob suggested, and tried again
to install Win32::SerialPort in my cygwin build.  however, it (Win:Ser) still
fails all tests.

   [EMAIL PROTECTED] ~/SerialPort-0.19
   $ perl test.pl 
   t/test1dubious  

Test returned status 0 (wstat 139, 0x8b)
test program seems to have generated a core
   DIED. FAILED tests 1-275
Failed 275/275 tests, 0.00% okay

   (... ditto each test group ...)

   Failed 7/7 test scripts, 0.00% okay. 1749/1749 subtests failed, 0.00% okay.

any suggestions?

thanks, rob



> Just checked and managed to find the Cygwin-compatible versions of API-0.20
> and 0.21. The gas assembly code was added by Daniel Risacher
> <[EMAIL PROTECTED]> . He may have something more recent if you want to
> check up on Google (or contact him) - though either of those 2 versions that
> I have should be quite adequate for Win32::SerialPort. Let me know if you
> want me to send 'em over.
> 
> 
> Cheers,
> Rob
> 
> 



__ 
Yahoo! Mail Mobile 
Take Yahoo! Mail with you! Check email on your mobile phone. 
http://mobile.yahoo.com/learn/mail 
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Perl Net executable build fails - cant find @INC

2005-05-04 Thread robert johnson

--- robert johnson wrote:
> Hi, i really need some help.  

dangit.  right after i cross-posted this, i solved my own problem.  

for some reason, with the ActiveState PDK requires that all "use" statements be
placed at the very top of the program.  I had put them later in the program.  
once i moved them to the top, it built correctly.

now seems kind of silly, but whatever.

and sorry for the cross-posting.  i was getting panicky.







> Ive been using Perl for a while, but am new to the ActiveState Perl Dev Kit
> environment.  my perl scripts will not build into executables correctly, when
> I
> have "use ".  teh perl dev kit claims that it cant find any perl
> modules in my @INC paths, and that the @INC is empty.  
> 
> I definitely have the modules installed in the right place, and these same
> scripts work correctly when i run them from command line.  
> 
> The PerlNET GUI's Main window shows that my "module search paths" do contain
> (C:\Perl\lib) and (C:\Perl\site\lib) which is where my CPAN modules are ... 
> Ive even added these paths to my PERL5LIB environment variable.   I've also
> tried putting a hard coded "push (@INC)" line in my code, as well as an
> explicit "require"...  still no help.
> 
> here is the output of my build attempts.  Thanks for any help anyone can
> provide me.
> 
> 
> 
> plc --shared public --norunlib --exe serial.exe J:\dl30\serial.pl
> 
> 
> PerlNET 6.0.0 build 117102
> Copyright (C) 1998-2004 ActiveState Corp.  All rights reserved.
> ActiveState is a division of Sophos Plc.
> Commercial license for  at 
> Created 'serial.exe' [Test it]
> Target size: 532 KB same as last time
> 
> [DONE]
> 
> .\serial.exe
> Can't locate win32/serialport.pm in @INC (@INC contains: .) at serial.pl line
> 195.
> BEGIN failed--compilation aborted at serial.pl line 195.
> 
> [DONE]
> 
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 



__ 
Yahoo! Mail Mobile 
Take Yahoo! Mail with you! Check email on your mobile phone. 
http://mobile.yahoo.com/learn/mail 
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Perl Net executable build fails - cant find @INC

2005-05-04 Thread robert johnson
Hi, i really need some help.  

Ive been using Perl for a while, but am new to the ActiveState Perl Dev Kit
environment.  my perl scripts will not build into executables correctly, when I
have "use ".  teh perl dev kit claims that it cant find any perl
modules in my @INC paths, and that the @INC is empty.  

I definitely have the modules installed in the right place, and these same
scripts work correctly when i run them from command line.  

The PerlNET GUI's Main window shows that my "module search paths" do contain
(C:\Perl\lib) and (C:\Perl\site\lib) which is where my CPAN modules are ... 
Ive even added these paths to my PERL5LIB environment variable.   I've also
tried putting a hard coded "push (@INC)" line in my code, as well as an
explicit "require"...  still no help.

here is the output of my build attempts.  Thanks for any help anyone can
provide me.



plc --shared public --norunlib --exe serial.exe J:\dl30\serial.pl


PerlNET 6.0.0 build 117102
Copyright (C) 1998-2004 ActiveState Corp.  All rights reserved.
ActiveState is a division of Sophos Plc.
Commercial license for  at 
Created 'serial.exe' [Test it]
Target size: 532 KB same as last time

[DONE]

.\serial.exe
Can't locate win32/serialport.pm in @INC (@INC contains: .) at serial.pl line
195.
BEGIN failed--compilation aborted at serial.pl line 195.

[DONE]


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: SerialPort problems -- cygwin / win32 / *nix

2005-05-03 Thread robert johnson

--- Bbirthisel wrote:
> Hello Robert,
> 
> In a message dated 4/29/2005 7:51:42 PM Eastern Daylight Time, 
> r_wray_johnson writes:
> 
> > checking the checking serial control via ioctl... no
> > configure: WARNING: Without ioctl support, most serial control functions
> > are missing.
> 
> That is not quite as fatal as it sounds. Some functions will run without 
> ioctl support. Although probably not enough to keep Device::Modem happy.

[snip]

> I am one of the earlier authors of Device::SerialPort. But I use 
> Win32::SerialPort under Cygwin (frequently). The real question for you is
> whether Posix.pm, which Device::SerialPort calls for its termio support, 
> works fully under Cygwin. It didn't several years ago - and the "unsupplied 
> headers" would suggest it still doesn't. But I don't know for sure. That is 
> the first question you should ask.

Ah, sorry i didn't mean to imply you were complicit in the plot :)  Thank you
very much for your detailed reply.

So, now my question becomes trivial.  How do I get Win32::SerialPort to work
under cygwin?  i tried installing this module but it dies miserably during the
make.  I therefore assumed it was incompatable with cygwin.  I've installed it
(win32:serial) and had it working just fine on my "normal" Windows perl build. 
Sorry for all the hand-holding, I'm feeling pretty incompetent about now.


> > so...  my task, should i accept it, is to port SerialPort.pm over to 
> > cygwin, by resolving the problems with the three missing header files.  
> > at least.  and probably then some more.
> 
> Oh yes, a whole lot more. The second question you should ask is whether the 
> zmodem routines will compile and run under Cygwin. At all, freestanding, no 
> Perl involved. The problems you will probably encounter (I have created 
> "customized" versions of them on linux, so I know the compile issues) will
> probably lead you back to that first question - or some varient of it.

well, since i'm so confounded by the simple issues, I might need to rethink my
strategy altogether.


> > which would be difficult if i knew what i was doing.  But since I 
> > Have No Idea, it should be a breeze, right?
> 
> My understanding of Cygwin is that it is an application layer environment. It
> is not (or at least none of the versions I have used have been) a complete 
> virtual OS. Hence, you still need to use the driver level code from the basic
> OS. For you, that will mean Win32::SerialPort. I suspect the port of un*x
> zmodem to Cygwin will not be trivial. But that is the place to start, since 
> the rest is irrelevant unless you get that working.
> 
> -bill
> 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


SerialPort problems -- cygwin / win32 / *nix

2005-04-29 Thread robert johnson
hello

i have been using activestate's perl for win32 just fine, except that i cant do
ZModem transfers.  so I installed CYGWIN, and built a new perl in that
environment, with the hopes i could use available zmodem routines built for
*nix.

problem is, whereas Win32::SerialPort worked just fine in windows, the
corresponding Device::SerialPort is not working so well in Cygwin.  the make
complains that it cant find the following header files:

/usr/include/sys/termiox.h
/usr/include/sys/ttycom.h
/usr/include/sys/modem.h

and warns:

checking the checking serial control via ioctl... no
configure: WARNING: Without ioctl support, most serial control functions are
missing.

well, thats not going to work.  and Device::Modem has a dependency on
Device::SerialPort.

ive been all over the net, the boards, hassling the folks at cygwin and the
author of the Devices::SerialPort module (Kees).  Cygwin claims that the
headers in quesion have never been in their distribution, and so the problem is
in the application code.  SerialPort.pm's author just said "hm, never tried it
on Cygwin".

so...  my task, should i accept it, is to port SerialPort.pm over to cygwin, by
resolving the problems with the three missing header files.  at least.  and
probably then some more.

which would be difficult if i knew what i was doing.  But since I Have No Idea,
it should be a breeze, right?

anyone got any suggestions?

thanks,
Robert




__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Modem File Transfer help

2005-04-19 Thread robert johnson
Title: Message



thanks, Bill and Ken, for your assistance.  i'll look into Omen and 
the other links you provided, and see what i can find from 
there.
 
--robert
 

  
  -Original Message-From: 
  Bbirthisel
   
   Ken 
  Cornetet writes:
  Omen Technology owns zmodem. To get the 
specs and reference code willcost a few $$.10+ years ago, when I licensed an MS-DOS 
  copy from Omen, it was very few $$. The Omen version ran very well from a 
  command, and included several options for controlling it that made good sense 
  to those of us with un*x backgrounds. The software included a pascal source - 
  I don't recall if it was x, y, or z though.
  Early version of the sz and rz programs were 
released as free software,but I've never heard of a windows port of 
them. If you want to codesomething up in C, they might be a good 
starting point.It would help to be very familiar with 
  embedded C techniques. Those versions were intended for porting to Un*x by at 
  least tolerable C programmers.
  http://www.ohse.de/uwe/software/lrzsz.html is 
decended from the old freerz/sz.And much improved, and easier to understand. 
  That is what is (or at least was) bundled with most linux distributions. I 
  recompiled that one to add options for custom varients of xmodem and ymodem 
  (for some other device that used an incompatible long_file_name 
  implementation).
  Here's some other 
stuff:http://web.mit.edu/afs/athena.mit.edu/astaff/project/telnet/src/omen/-Original 
    Message-From:  Robert Johnson Ken Cornetet 
wrote:>> Win32::SerialPort> > 
http://members.aol.com/Bbirthisel/alpha.html> > This will let 
you send and receive bytes via serial ports, but AFAIK, > there isn't 
any perl code for doing zmodem transfers (but then I > haven't done a 
great deal of looking, either).There isn't. I one considered an xmodem 
  example - and someone started one - but there was too little real demand and 
  it would have taken quite a bit of work to have a fully functional and 
  reliable version.
  that will let me do basic communication 
and such, but wont allow filetransfers (at least not 
ZModem).> Best I remember, zmodem is not a trivial protocol 
to implement. It > would be possible to write a perl implementation, 
but not trivial.hmm.  thats what i was afearin'.   
your link (above) was interesting.got any other 
idears?Zmodem is certainly non-trivial, even with a 
  C source handy. And if you strip out all the error handling and 
  self-configuring code it is no longer zmodem (or especially useful). 
  
  > Can you have your device do xmodem 
or ymodem transfers instead? Either> of these would be fairly 
easy to implement in perl.unfortunately not.   this 
particular product only has ZModem.   whichkind of sucks, 
because I can't seem to get TeraTerm to work correctly,either, and so am 
forced to use HyperTerm as an interface.It looks like I'll have to 
try and do this in C or VB.  which is a drag,because my test suites 
so far have been entirely in Perl.I would contact Omen if I had a requirement 
  like that. They may have an option that could be run inside a perl 
  wrapper.
  > > is getting a modem connection 
via perl that difficult?Strange as it may seem, yes is the correct answer. Byte-streams are not 
  a native way of moving data on 
Windows.-bill
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Modem File Transfer help

2005-04-19 Thread Robert Johnson
i have some devices that send data files via ZModem.   i want to
automate the process of receiving these files for parsing via a perl
script.

after searching CPAN and other sites, i find that it's not as easy as i
would have thought.

Devices::Modem doesnt allow file transfer, and is apparently very
limited in the things that it can do.  mgetty/vgetty is only for *nix
machines.   these are the only things i can find related to modems.

is getting a modem connection via perl that difficult?

any help will be great, thanks

robert


(ps, this was sent earlier from work, with the silly ATT\d+.txt webmail
attachment)

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


and this is fun, too

2005-04-17 Thread Robert Johnson

$maxerrors = 220; # needs tuning
$pi = reverse
"3.141592653589793238462643383279502884197169399375105820974944592307816
406286208998628034825342117067982148086513282306647093844609550582231725
359408128481117450284102701938521105559644622948954930381964428810975665
933446128475648233786783165271201909145648566923460348610454326648213393
607260249141273724587006606315588174881520920962829254091715364367892590
360011330530548820466521384146951941511609433057270365759591953092186117
381932611793105118548074462379962749567351885752724891227938183011949129
833673362440656643086021394946395224737190702179860943702770539217176293
176752384674818467669405132000568127145263560827785771342757789609173637
178721468440901224953430146549585371050792279689258923542019956112129021
96086403441815981362977477130996051870721134998372978049951059731732
816096318595024459455346908302642522308253344685035261931188171010003137
838752886587533208381420617177669147303598253490428755468731159562863882
353782016673231564231563231874231873231284231283236583236973236472239231
011673231564231563232873231874231283231283231584231583231974231973231477
239231011673236563231871231872231874235283231584231583231974231973231477
239231011673231564231563231872231871231873231284231283231584231583231974
231973231477239231011674234564231873232873236283231584231583236973231477
239233017239231016673231284231283236968231088231011674231283231288231968
231088231011674235286233964235088231011673231284231288231963231084231088
231011673236283236963236088234016963231274231276231482231011963231274231
276231482231019233963236276231482231011963231274231276231482231016963231
27423127423548101";
while ($offset < length($pi)) {
my($x) = substr($pi, $offset +++ 0, 2);
my($y) = substr($pi, $offset +++ 1, 1); # XXX should be 3?
my($z) = substr($pi, $offset +++ 2, 1);
if ($x * cos($y) / cos($z)) {
$dbg .= chr ($x) x $y;
if (++$errors >= $maxerrors) {
# "should not happen"
die("$dbg\n");
}
}
}
# passes sig test
print("ok!\n");

# ---
# Results:  $PI a la Carl Sagan's "Contact".


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Regex

2005-04-16 Thread Robert Johnson

Jim Hansen wrote:
> THat's not doing it either.  For some reason, when it
> is compiled, that line is ignored.
> 

sorry, i missed the part where you said it was working as a script, but
not as a compiled executable.  

I don't use the ActiveState compiler, and don't know why that would be
happening.  Perhaps someone else has experience with this.

sorry i can't be more help.  good luck


> 
> --- Robert Johnson wrote:
> > Jim Hansen wrote:
> > > 
> > > $name = 'HP4000 [PSserver01]';
> > > if ( $name =~ /[PSserver/ ) {
> > > next;
> > > }
> > > running this straight as a script with the '-d'
> > switch
> > > or without, it works fine, but if I compile it and
> > run
> > > it, for some reason it is ignored and I end up
> > with my
> > > issue.  IS there a better way to trap for this?
> > > 
> > 
> > if you want to find a match, and the match includes
> > certain characters
> > -- e.g., ()[]{}\/$#%*. -- you have to precede these 
> characters with a
> > backslash. because otherwise they have specific
> > functions defining the
> > regex.   
> > 
> > so the line should be written
> > 
> > if ( $name =~ /\[PSserver/ )
> > 
> > 
> > --robert
> > 
> > 
> > 

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Regex

2005-04-16 Thread Robert Johnson
Jim Hansen wrote:
> 
> $name = 'HP4000 [PSserver01]';
> if ( $name =~ /[PSserver/ ) {
> next;
> }
> running this straight as a script with the '-d' switch
> or without, it works fine, but if I compile it and run
> it, for some reason it is ignored and I end up with my
> issue.  IS there a better way to trap for this?
> 

if you want to find a match, and the match includes certain characters
-- e.g., ()[]{}\/$#%*. -- you have to precede these characters with a
backslash. because otherwise they have specific functions defining the
regex.   

so the line should be written

if ( $name =~ /\[PSserver/ ) 


--robert




___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Regex

2005-04-16 Thread Robert Johnson

Jim Hansen wrote:
> 
> Sorry.  Lousy explanation.  I have a string that will have 
> PSserver01...02, etc.  I need to check for this string:
> 
> $Printserver = "HP4000 [PSserver01]"
> 
> I guess this can be as simple as
> 
> $Printserver = "HP4000 [PSserver01]"
> if ( ! /PSserver/ ) {
> do
> }


Not quite sure what you want to do, but here's an example that could
cover several possible scenarios:

my $name, $type, $number;
if ($Printserver =~ /(\S+)\s+\[(\w+)(\d+)\]/) {
$name=$1;
$type=$2;
$number=$3;
}
else {
die "\$Printserver variable match error, stopped";
}
if ($name eq "HP4000") {#found exact string HP4000 in name field
...
}
if ($type !~ /PServer/) {   #did not match PServer within type field
...
}
elsif ($number=2) { #found PServer02 (since match above
failed)
...
}


hope this helps.  
robert

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: problem with TERM::ReadKey

2005-03-29 Thread Robert Johnson
> Jezebel wrote:
> I have found what i think is what I need:  The
> TERM::ReadKey module and/or the TERM::GetKey module
> (which depends on ReadKey)
>  
> problem is, i can not compile the TERM::ReadKey from
> source.  


I found an alternative on CPAN:  TERM::GETCH  -- apparently the author
also had trouble with READKEY, and hacked out a reduced version.  It
doesn't require C++.

http://cpan.uwinnipeg.ca/dist/Term-Getch

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: ExtUtils-F77 make test fails and dies: "-x" file test switch isbroken?

2005-01-09 Thread Robert Johnson

Earlier, I babbled:

> I have an error in the "-x" file test option.  Found while 
> building the ExtUtils F77.pm module.  The result, for me, was 
> that the 'make test' failed and died because a routine didn't 
> recognize my fortran compiler as being executable

Uh, never mind.  Its not the "-x", its just the fact that the filenames 
didn't have .exe appended.   Duh.  My only excuse is it's really 
really late (early) now.  Well, at least my fix was correct.





___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


ExtUtils-F77 make test fails and dies: "-x" file test switch is broken?

2005-01-09 Thread Robert Johnson
I have an error in the "-x" file test option.  Found while building the
ExtUtils F77.pm module.  The result, for me, was that the 'make test'
failed and died because a routine didn't recognize my fortran compiler
as being executable

(This module is a prereq for PDL)

F77.pm line 160 

   $F77config{Generic}{G77}{Compiler} =
find_in_path('g77','f77','fort77');

calls the subroutine at line 556

   sub find_in_path {
  my @names = @_;
  my @path = split(":",$ENV{PATH});
  my ($name,$dir);
  for $name (@names) {
 for $dir (@path) {
if (-x $dir."/$name") {
 print "Found compiler $name\n";
 return $name;
 }
}
 }
  return '' if $^O eq 'VMS';
  die "Unable to find a fortran compiler using names: ".join("
",@names);
  }

But it can't find my g77 compiler.  I thought the problem was the split
on colon's (:), WinXP uses semi's (;).  But the reason seems to be that
the "-x" file test option does not work:  the compiler is in my PATH,
but not recognized here.

Is this "-x" switch broken?  Or is something configured wrong on my end?

At the moment, my WORKAROUND is to append '.exe' to each of the names
passed to find_in_path, and change the -x switch to -e.

--RWJ



___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Compile PDL module fails: makefile trouble?

2005-01-08 Thread Robert Johnson
I'm having a rough time installing stuff for Perl (win32).  I think
maybe my problems stem from my general cluelessness about makefiles.

Trying to install PDL (http://pdl.perl.org/) 

perl makefile.PL 

seems to be ok, but

dmake 

Fails with the following

g++: pdlcore.o: No such file or directory
g++: pdlconv.o: No such file or directory
dmake.exe:  Error code 1, while making
'..\..\blib\arch\auto\PDL\Core\Core.dll'
dmake.exe:  Error code 255, while making 'subdirs'
dmake.exe:  Error code 255, while making 'subdirs'

The PDL install notes for Win32 give the following information, which I
followed:

   The first nmake stops with an error that Core.obj is not found.
   Workaround: once you get this error do the following:

   cd Basic\Core
   nmake Core.xs
   del getdev.pl # this one is important, otherwise you get a
 # circular Makefile dependence!
   cd ..\..
   perl Makefile.PL # with F77CONF=win32/win32f77.pl if you want slatec
   nmake

But it still fails anyhow, in the same way

Any ideas?

Robert

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


GIMP-PERL on Windows ?

2005-01-06 Thread Robert Johnson
Is this even possible?

I'm having a helluvatime finding any information on installign the
Gimp-Perl modules in a windows environment.  (every time I try, it never
works)

If anyone has a hint for me, please let me know

Thanks,
Rob

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Remove Email of [EMAIL PROTECTED]

2005-01-06 Thread Robert Johnson
Title: Message




Hey 
Frank, 
 
these damn things just never work right, do 
they?
 
Try following this link, 
it should help -->   Please Daddy Make It 
Stop1

Best,
Robert
 

  
  -Original Message-From: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] On Behalf Of 
  Frank75063Sent: Wednesday, January 05, 2005 8:30 
  PMTo: perl-win32-users@listserv.ActiveState.comSubject: 
  Re: Remove Email of [EMAIL PROTECTED]
  Please remove [EMAIL PROTECTED]
   
  Thanks
  __Do You 
  Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around 
  http://mail.yahoo.com 
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: [SOLVED]: Errors during dmake test, after building perl 5.8.6

2005-01-05 Thread Robert Johnson
Oh, and Nick gets the points  :)




Nick Ing-Simmons wrote:

> Robert Johnson writes:
> >
> >> if ($^O eq 'MSWin32') returns true, then the cmd.exe 
> system commands
> >> will be available.
> >
> >Other windows system commands do work.  Like
> >  `rename filename.txt newfile.txt`
> >   print `dir /b/ad` 
> >Etc...
> 
> Perhaps this system as a type.exe or similar somewhere in %Path% ?
> 
> 

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


[SOLVED]: Errors during dmake test, after building perl 5.8.6

2005-01-04 Thread Robert Johnson
Sisyphus,Nick,IvorW,Erick,Jan,$Bill,et.al...

There was a 'type.exe' in my PATH...  in my WinAVR/utils/bin directory.
Had a plethora of command executables in there, actually.

So I took WinAVR out of my path, and now "dmake test" passes every
single test.

Thanks for all of your help, especially Sisyphus  :-)

Rob



> -Original Message-
> From: Sisyphus [mailto:[EMAIL PROTECTED] 
> Sent: Monday, January 03, 2005 5:55 PM
> Cc: Robert Johnson; 
> perl-win32-users@listserv.ActiveState.com; 
> [EMAIL PROTECTED]
> Subject: Re: Errors during dmake test, after building perl 5.8.6
> 
> 
> Sisyphus wrote:
> 
> > 
> > Even if you do have a 'type.exe' in your path, I would expect that
> > there's some way of having `type` find the shell command 
> rather than the 
> > executable file. Sadly, I can't find a way of achieving 
> that - tried 
> > messing with $ENV{PATHEXT}, but that doesn't achieve the 
> desired result.
> > 
> > I'll ask about that on the "users" list in a separate thread.
> > 
> 
> Here are 2 ways to ensure that the 'type' cmd.exe shell command gets 
> called.
> First (thanks to $Bill Luebkert) -
> Change from:
> `type IO.dup`
> To:
> `cmd /C type IO.dup`
> 
> Second (thanks to Jan Dubois) -
> Change from:
> `type IO.dup`
> To:
> `type IO.dup  
> If the op alters the 3 affected test scripts in accordance 
> with either 
> of the above fixes, then they should run as the author of the test 
> scripts expected.
> 
> Cheers,
> Rob
> 

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Errors during dmake test, after building perl 5.8.6

2005-01-03 Thread Robert Johnson
Sisyphus wrote:
> 
> 
> Was that the full error statement ? Maybe there was more:
> sh: type: filename.txt not found

No.  Just "filename.txt not found"

> if ($^O eq 'MSWin32') returns true, then the cmd.exe system commands 
> will be available.

Other windows system commands do work.  Like 
  `rename filename.txt newfile.txt`
   print `dir /b/ad` 
Etc...

> 
> Other than that *I'm* just plain curious to know how this has 
> come about :-)
> 
> Now - for a possible fix:
> Run dmake clean.
> Alter the line (in makefile.mk) from:
> #SHELL*= g:\winnt\system32\cmd.exe
> to:
> SHELL *= C:\winnt\system32\cmd.exe
> 
> If you go to the trouble of doing that could you let me know 
> whether it 
> works or not ? I've never had cause to fiddle with that configuration 
> option and I don't know if it's going to have the desired effect :-)

Actually, I did try that when I rebuilt the second time.  
  SHELL *= C:\windows\system32\cmd.exe
I tried it once with make clean, then I deleted the entire build and 
downloaded a fresh stable source.

The effect is the same, I still get the same errors during test.  So
the option works correctly, but has no effect on my issue.  There 
are several "file not founds" during the test, I think maybe this 
has something to do with it?   (see my new thread where I print
more of the error details...)

Thanks,
Rob


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Build warnings and test failures for perl 5.8.6

2005-01-03 Thread Robert Johnson
Sisyphus(Rob), et. al., 

This is my second try to build the stable perl -- same 
problems.  New thread for clarity.

I'm building Perl 5.8.6 again on my Windows XP box (factory 
Dell dimension <2yrs old standard stuff).  Compiled it with 
with MinGW (3.1.0) using dmake (4.1 for win32).

I'm still having the same problems:  several of the 
'dmake test' items fail.  

as Sisyphus noted on my first try, the failed tests all 
seem to have something to do with the `type command.  I 
tried using `type in this recently built perl, and in a 
previous installation of the ActiveState perl binary (5.8.1) 
-- in both cases `type can not find the specified file in 
perl, but it can in the windows  shell.

I only use the WinXP cmd.exe shell.  I believe I configured 
makefile.mk correctly, according to readme instructions.  

Attached below are the failures/warnings that came up 
during the 'dmake test' as well as during the build process.  
I hope this will be useful, and that you can help me figure 
out what's going wrong here. 

Thanks,

Rob



===WARNS/FAILS FROM DMAKE TEST

dmake.exe: makefile: line 2:  Warning -- Macro `PERL' cannot be
redefined


comp/multiline..
Comp.try not found
# Failed at ./test.pl line 249
#  got ''
# expected /(?-xism:.*\n.*\n.*\n$)/
# Failed at comp/multiline.t line 53
#  got ''
# expected 'now is the time
# for all good men
# to come to.
#
#
# !
#
# '
comp/multiline..FAILED tests 5-6
Failed 2/6 tests, 66.67% okay


io/dup..
Io.dup not found
Confused test output: test 3 answered after test 8
Confused test output: test 4 answered after test 9
Confused test output: test 5 answered after test 10
Confused test output: test 6 answered after test 11
Confused test output: test 7 answered after test 12
Confused test output: test 8 answered after test 13
Confused test output: test 9 answered after test 14
Confused test output: test 10 answered after test 15
Confused test output: test 11 answered after test 16
Confused test output: test 12 answered after test 17
Confused test output: test 13 answered after test 18
Confused test output: test 14 answered after test 19
Confused test output: test 15 answered after test 20
Confused test output: test 16 answered after test 21
Confused test output: test 17 answered after test 22
Confused test output: test 18 answered after test 23
Confused test output: test 19 answered after test 24
Confused test output: test 20 answered after test 25
io/dup..FAILED tests 2-7
Failed 6/26 tests, 76.92% okay


../ext/IO/t/io_dup..
Io.dup not found
../ext/IO/t/io_dup..FAILED tests 2-5
Failed 4/6 tests, 33.33% okay


dmake.exe: makefile: line 695: Warning -- Macro `TEST_VERBOSE' cannot be
redefined
dmake.exe: makefile: line 73: Warning -- Macro `PREFIX' cannot be
redefined
dmake.exe: makefile: line 72: Warning -- Macro `DESTDIR' cannot be
redefined
dmake.exe: makefile: line 73: Warning -- Macro `PREFIX' cannot be
redefined
dmake.exe: makefile: line 72: Warning -- Macro `DESTDIR' cannot be
redefined
dmake.exe: makefile: line 73: Warning -- Macro `PREFIX' cannot be
redefined


# Failed test 18 in ../lib/Net/Ping/t/450_service.t at line 143 *TODO*
#  ../lib/Net/Ping/t/450_service.t line 143 is: ok $p -> ack();


Failed Test  Stat Wstat Total Fail  Failed  List of Failed
-
../ext/IO/t/io_dup.t64  66.67%  2-5
comp/multiline.t62  33.33%  5-6
io/dup.t   266  23.08%  2-7
59 tests and 696 subtests skipped.
Failed 3/911 test scripts, 99.67% okay. 12/88274 subtests failed, 99.99%
okay.
dmake.exe:  Error code 255, while making 'test'
 
===BUILD WARNINGS DURING DMAKE

win32.c: In function `win32_execv':
win32.c:4052: warning: passing arg 3 of `spawnv' from incompatible
pointer type
win32.c:4054: warning: passing arg 2 of `execv' from incompatible
pointer type
win32.c: In function `win32_execvp':
win32.c:4074: warning: passing arg 2 of `execvp' from incompatible
pointer type


../perl.c: In function `S_my_exit_jump':
../perl.c:4805: warning: `noreturn' function does return
In file included from perllib.c:49:
perlhost.h: In function `CPerlHost* IPerlMem2Host(IPerlMem*)':
perlhost.h:239: warning: invalid offsetof from non-POD type `class
CPerlHost';
   use pointer to member instead
perlhost.h: In function `CPerlHost* IPerlMemShared2Host(IPerlMem*)':
perlhost.h:244: warning: invalid offsetof from non-POD type `class
CPerlHost';
   use pointer to member instead
perlhost.h: In function `CPerlHost* IPerlMemParse2Host(IPerlMem*)':
perlhost.h:249: warning: invalid offsetof from non-POD type `class
CPerlHost';
   use pointer to member instead
perlhost.h: In function `CPerlHost* IPerlEnv2Hos

RE: Errors during dmake test, after building perl 5.8.6

2005-01-03 Thread Robert Johnson
Sisyphus wrote:
>  
> Robert Johnson wrote:
> > 
> > Hmm.  I tried doing a `type filename.txt`, and perl always  
> > returns "filename.txt not found"
> > 
> > (note:   does exist in the working directory, and 
> > entering "type filename.txt" from the MS command window 
> > prompt works as designed)
> > 
> 
> That's bizarre.
> Could there be some shell (ie other than cmd.exe) interfering 
> here ? I think the 'type' command means something different in 
> other shells.

I haven't installed any other shells (on purpose, anyhow)
At any rate, I only ever use the  shell

> 
> > This happens on both my recent build of 5.8.6, and my previous 
> > installation of ActiveState's binary build, which is 5.8.1.
> > 
> > I suspect there is something wrong on my end, a setup or config 
> > file, or environment variable, or something.   But I'm pretty 
> > clueless about windows.
> > 
> > On the other hand, is this even worth chasing down?  Does 
> > `type get used much in the perl modules?  I never even heard 
> > of this command before today.   (I said I was clueless)
> > 
> 
> Well  the test script is not actually testing the 'type' command. 
> It's using the 'type' command to test other things - and in your case 
> `type ...` is not working as expected. 

Right.  I was just wondering how important the `type command 
is to win32 perl in general.   If I left this unfixed, what 
Functions would be broken?  Maybe I could live with it...

> It would be good to understand why that is - especially if it means 
> that the test scripts need to be modified.
> 
> Unless you're somehow invoking another shell from perl (maybe bash?), 
> I'm at a loss to understand what's going on.
> 
> Did you build your perl in the MS command (cmd.exe) shell ?

yes

> Do you normally run your perl scripts in the cmd.exe shell ? 

yes

> Did you alter the line that begins "#SHELL" in the 
> configurable section of makefile.mk ?

no

> 
> (Answers should be "yes", "yes", "no" - in that order.)

Heh...  Of course those would have been my answers even without the key


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Errors during dmake test, after building perl 5.8.6

2005-01-02 Thread Robert Johnson
Hmm.  I tried doing a `type filename.txt`, and perl always returns
"filename.txt not found"

(note:   does exist in the working directory, and entering
"type filename.txt" from the MS command window prompt works as designed)

This happens on both my recent build of 5.8.6, and my previous
installation of ActiveState's binary build, which is 5.8.1.

I suspect there is something wrong on my end, a setup or config file, or
environment variable, or something.   But I'm pretty clueless about
windows.

On the other hand, is this even worth chasing down?  Does `type get used
much in the perl modules?  I never even heard of this command before
today.   (I said I was clueless)

Thanks

Rob






> -Original Message-
> From: Sisyphus [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, January 02, 2005 2:57 PM
> To: Robert Johnson
> Cc: [EMAIL PROTECTED]; 
> perl-win32-users@listserv.ActiveState.com
> Subject: Re: Errors during dmake test, after building perl 5.8.6
> 
> 
> Robert Johnson wrote:
> > Here are my results:
> > 
> > Failed Test  Stat Wstat Total Fail  Failed  List of Failed
> > 
> --
> > --
> > ---
> > ../ext/IO/t/io_dup.t64  66.67%  2-5
> > comp/multiline.t62  33.33%  5-6
> > io/dup.t   266  23.08%  2-7
> > 59 tests and 696 subtests skipped.
> > Failed 3/911 test scripts, 99.67% okay. 12/88274 subtests 
> failed, 99.99%
> > okay.
> > dmake.exe:  Error code 255, while making 'test'
> > 
> > C:\perl-5.8.6\win32>
> > 
> > 
> > 
> > Windows XP on a POS Dell, compiled the "stable" perl (5.8.6) with 
> > MinGW
> > (3.1.0) using dmake 4.1 for win32.
> > 
> > I think I did everything correct.   So what are these 
> errors about, and
> > where should I go from here?
> > 
> 
> Interesting - if you search the perl source distro for all '.t' files 
> that contain the string `type (note the preceding backtick) you get 
> exactly 3 files. Those 3 files are the very same 3 mentioned above.
> 
> So it may just be that the 'type' command (which is a windows system 
> command) is not behaving as the author(s) of those 3 test scripts 
> expected - though I found no such problem when I built perl 5.8.6 on 
> Windows 2000 using (presumably) the same source and (definitely) the 
> same tools a couple of weeks ago.
> 
> Or perhaps there's something else going on - though I think that 
> whatever the problem is, it will turn out to be a problem 
> with the test 
> scripts and/or unanticipated system behaviour, rather than a problem 
> with the perl you have just built.
> 
> If you already have another perl on your machine, you might 
> like to run 
> comp\multiline.t (and the other 2 as well) and see whether 
> all the tests 
> pass.
> 
> Or do something like:
> 
> my $x = "\n\n a \n\n\n string \n\n ! \n\n\n";
> # write $x to a file named, eg, 'multi.txt'
> my $z = `type multi.txt`;
> if($z eq $x) {print "As expected\n"}
> else {print "Not as expected\n"}
> 
> Cheers,
> Rob
> 

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Errors during dmake test, after building perl 5.8.6

2005-01-02 Thread Robert Johnson

Here are my results:

Failed Test  Stat Wstat Total Fail  Failed  List of Failed

---
../ext/IO/t/io_dup.t64  66.67%  2-5
comp/multiline.t62  33.33%  5-6
io/dup.t   266  23.08%  2-7
59 tests and 696 subtests skipped.
Failed 3/911 test scripts, 99.67% okay. 12/88274 subtests failed, 99.99%
okay.
dmake.exe:  Error code 255, while making 'test'

C:\perl-5.8.6\win32>



Windows XP on a POS Dell, compiled the "stable" perl (5.8.6) with MinGW
(3.1.0) using dmake 4.1 for win32.

I think I did everything correct.   So what are these errors about, and
where should I go from here?

Thanks,

Rob

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs