Re: Running perl from a test on Windows

2013-01-29 Thread Buddy Burden
Daniel, >> "I need to collect the output from the other Perl library *without >> loading it*, because I also want to make sure that my library loads it >> for me" > Is there a reason the output has to be created during testing rather > than being part of the distribution? But that means I'm depe

Re: Running perl from a test on Windows

2013-01-29 Thread Daniel Perrett
"I need to collect the output from the other Perl library *without loading it*, because I also want to make sure that my library loads it for me" Is there a reason the output has to be created during testing rather than being part of the distribution? What about running it out in a .t file which pr

Re: Running perl from a test on Windows

2013-01-28 Thread Buddy Burden
schwern, Oh, hey, look: I never responded to this. Bad coder. :-) >>> One way to deal with this problem is to use the flexibility of TAP and >>> eshew a testing library. >>> >>> print "1..1\n"; >>> >>> ...run your code normally here... >>> >>> print $ok ? "ok 1\n" : "not ok 1\n"; >

Re: Running perl from a test on Windows

2013-01-15 Thread David Cantrell
On Tue, Jan 15, 2013 at 11:50:17AM -0800, Buddy Burden wrote: > Yeah, but then I have to do as Gabor suggests and deal with $^O, and > is it different on Win32 vs Cygwin, and are there any other OSes I > need to be worried about, and I'm getting mildly nauseous just > thinking about it. :-/ Devel

Re: Running perl from a test on Windows

2013-01-15 Thread Buddy Burden
First, let me say: Thanx everyone for all your suggestions! Eirik, > That problem is not shell nastiness. It is quoting. Observe: > : > : > If I recall correctly, the thing is that on Windows, a brand new process > does not get an argument array. > > On Windows, it gets a command line.

Re: Running perl from a test on Windows

2013-01-15 Thread Eirik Berg Hanssen
On Tue, Jan 15, 2013 at 3:53 PM, David Cantrell wrote: > On Tue, Jan 15, 2013 at 01:32:09AM -0800, Buddy Burden wrote: > > Gabor, > > > I am not sure if this helps but in Windows you need to put the > > > double-quotes around $cmd > > > > > > my $output = qx{$^X -e "$cmd"}; > > Yes, that woul

Re: Running perl from a test on Windows

2013-01-15 Thread David Cantrell
On Tue, Jan 15, 2013 at 01:32:09AM -0800, Buddy Burden wrote: > Gabor, > > I am not sure if this helps but in Windows you need to put the > > double-quotes around $cmd > > > > my $output = qx{$^X -e "$cmd"}; > Yes, that would work if I were running _only_ on Windows. But I need > it work for

Re: Running perl from a test on Windows

2013-01-15 Thread Buddy Burden
Karen, > Test::Without::Module should be able to take care of this for you. H ... interesting. That _might_ work ... I'd have to try it out. I'm not sure just pretending it isn't loaded is sufficient. But I'll look into it. -- Buddy

Re: Running perl from a test on Windows

2013-01-15 Thread Buddy Burden
Eirik, > On Windows, that still leaves a quoting problem, I believe. > IPC::System::Simple certainly does not seem to handle it: Unless I misread > it entirely, it ends up sending "$^C -e $cmd" as the command line to > Win32::Process::Create. > > Let's see ... > > C:\Windows\system32>perl -MIP

Re: Running perl from a test on Windows

2013-01-15 Thread Gabor Szabo
On Tue, Jan 15, 2013 at 11:32 AM, Buddy Burden wrote: > Gabor, > >> I am not sure if this helps but in Windows you need to put the >> double-quotes around $cmd >> >> my $output = qx{$^X -e "$cmd"}; > > Yes, that would work if I were running _only_ on Windows. But I need > it work for everyth

Re: Running perl from a test on Windows

2013-01-15 Thread Buddy Burden
Gabor, > I am not sure if this helps but in Windows you need to put the > double-quotes around $cmd > > my $output = qx{$^X -e "$cmd"}; Yes, that would work if I were running _only_ on Windows. But I need it work for everything (and the double quotes on Linux will cause any variables in my

Re: Running perl from a test on Windows

2013-01-14 Thread Eirik Berg Hanssen
On Mon, Jan 14, 2013 at 9:06 PM, Gabor Szabo wrote: > On Mon, Jan 14, 2013 at 9:59 PM, Buddy Burden > wrote: > > Guys, > > > > Okay, my Google-fu is failing me, so hopefully one of you guys can help > me out. > > > > For a test, I need to run a snippet of Perl and collect the output. > > However

Re: Running perl from a test on Windows

2013-01-14 Thread Karen Etheridge
On Mon, Jan 14, 2013 at 11:59:16AM -0800, Buddy Burden wrote: > Guys, > > Okay, my Google-fu is failing me, so hopefully one of you guys can help me > out. > > For a test, I need to run a snippet of Perl and collect the output. > However, if it rus in the current interpreter, it will load a modu

Re: Running perl from a test on Windows

2013-01-14 Thread Gabor Szabo
On Mon, Jan 14, 2013 at 9:59 PM, Buddy Burden wrote: > Guys, > > Okay, my Google-fu is failing me, so hopefully one of you guys can help me > out. > > For a test, I need to run a snippet of Perl and collect the output. > However, if it rus in the current interpreter, it will load a module > that

Running perl from a test on Windows

2013-01-14 Thread Buddy Burden
Guys, Okay, my Google-fu is failing me, so hopefully one of you guys can help me out. For a test, I need to run a snippet of Perl and collect the output. However, if it rus in the current interpreter, it will load a module that I need not to be loaded ('cause I'm also going to test if my code pro