Testing my CGI

2014-11-04 Thread Patton, Billy N
I’m using WWW::Mechanize for testing my CGI. I’m having trouble with the $mech-tick Here’s my code : ok($mech-form_name('cdr_format'),getting form cdr_format); print pAllFields = . $mech-value('pAllFields') . \n; 219- ok($mech-tick('pAllFields',1), 'Setting checkbox to native CDR format

Re: Testing my CGI

2014-11-04 Thread John SJ Anderson
billy.pat...@h3net.com wrote: I’m using WWW::Mechanize for testing my CGI. I’m having trouble with the $mech-tick Here’s my code : ok($mech-form_name('cdr_format'),getting form cdr_format); print pAllFields = . $mech-value('pAllFields') . \n; 219- ok($mech-tick('pAllFields',1), 'Setting

Testing a standalone script

2013-10-29 Thread Manfred Lotz
Hi there, I have some relatively small standalone perl scripts where I would like to include tests. Which is the recommended way to test standalone scripts? -- Manfred -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org

Re: Testing a standalone script

2013-10-29 Thread Shawn H Corey
. And see `man prove`. `prove` is a Perl tool for testing modules but it can be adapted for scripts. Each test script is given the extension *.t . -- Don't stop where the ink does. Shawn -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners

Re: Testing a standalone script

2013-10-29 Thread Manfred Lotz
way to test standalone scripts? Put the tests in a directory call t under the source. And see `man prove`. `prove` is a Perl tool for testing modules but it can be adapted for scripts. Each test script is given the extension *.t . This is exactly what I don't want to do. IMHO

Re: Testing a standalone script

2013-10-29 Thread John SJ Anderson
On Tue, Oct 29, 2013 at 11:02 AM, Manfred Lotz manfred.l...@arcor.de wrote: This is exactly what I don't want to do. IMHO, for testing modules or applications this is the way to go. However, for a standalone script I'd like to have my test data inside the script itself. Well, you could add

Re: Testing a standalone script

2013-10-29 Thread Manfred Lotz
On Tue, 29 Oct 2013 12:01:52 -0700 John SJ Anderson geneh...@genehack.org wrote: On Tue, Oct 29, 2013 at 11:02 AM, Manfred Lotz manfred.l...@arcor.de wrote: This is exactly what I don't want to do. IMHO, for testing modules or applications this is the way to go. However, for a standalone

Re: I'd like to explain to me how to do testing on lists and list slices

2012-03-10 Thread Shlomi Fish
+/) Should it be records instead of recording? I would like to test on how many times a user or an ip c is connected via the time value and authorize or not the execution of the following function I'd like to explain to me how to do testing on lists and list slices You can use any of the Perl

Re: I'd like to explain to me how to do testing on lists and list slices

2012-03-10 Thread m...@roundcube.fakessh.eu
I'd like to explain to me how to do testing on lists and list slices You can use any of the Perl operators and functions that operate on lists and arrays like foreach, http://perldoc.perl.org/functions/grep.html , http://perldoc.perl.org/functions/map.html or http://search.cpan.org

I'd like to explain to me how to do testing on lists and list slices

2012-03-09 Thread ml
like to test on how many times a user or an ip c is connected via the time value and authorize or not the execution of the following function I'd like to explain to me how to do testing on lists and list slices sincerely -- http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xC2626742 gpg

Testing for Missing Packages

2011-12-24 Thread Eric James Michael Ritz
Hello everyone. Here is my question: What is the preferred way to test a system for installed modules? For example, I have a Perl program I would like to distribute. It depends on a number of modules from CPAN and I would like an easy way to test for the existence of those modules. I suppose

Re: Testing for Missing Packages

2011-12-24 Thread Shlomi Fish
Hi Eric, On Sat, 24 Dec 2011 20:23:17 -0500 Eric James Michael Ritz lobbyjo...@gmail.com wrote: Hello everyone. Here is my question: What is the preferred way to test a system for installed modules? For example, I have a Perl program I would like to distribute. It depends on a number of

Re: AW: Testing File Contents

2011-03-04 Thread Dr.Ruud
On 2011-03-02 19:22, Christian Marquardt wrote: open CFG, '', $_file || die(could not open file: $_file!); That only dies if $_file is false. Funny that you did use parentheses with die. Some '$' characters were missing too: open my $CFG, '', $_file or die Error opening '$_file',

Re: Testing File Contents

2011-03-03 Thread C.DeRykus
On Mar 2, 9:55 am, lm7...@gmail.com (Matt) wrote: I am looking for a simple way to test if a file does not contain a string.  This is on a linux box. if myfile does not contain mystring {   #do_something;   } The file is basically a list of names and I want to test that a certain name is

Testing File Contents

2011-03-02 Thread Matt
I am looking for a simple way to test if a file does not contain a string. This is on a linux box. if myfile does not contain mystring { #do_something; } The file is basically a list of names and I want to test that a certain name is not in there. Is there an easy way to do that? -- To

Re: Testing File Contents

2011-03-02 Thread Parag Kalra
# Untested use strict; use warnings; open my $fh, '', my_file; while($fh){ if ($_ !~ /my_string/) { # Do something } } The other way would be on shell - # Untested grep my_string my_file if [ $? -eq 1 ] then echo Do something fi ~Parag On Wed, Mar 2, 2011 at 9:55 AM, Matt

Re: Testing File Contents

2011-03-02 Thread Parag Kalra
On Wed, Mar 2, 2011 at 10:11 AM, Parag Kalra paragka...@gmail.com wrote: Sorry for the top post. I should have done bottom post. :( # Untested use strict; use warnings; open my $fh, '', my_file; while($fh){ if ($_ !~ /my_string/) { # Do something } } The other way

AW: Testing File Contents

2011-03-02 Thread Christian Marquardt
= grep !/$searchstring/i, @data; ... you can remove the searchstring from your array (file-text). best regards Christian Von: Matt [lm7...@gmail.com] Gesendet: Mittwoch, 2. März 2011 18:55 Bis: beginners@perl.org Betreff: Testing File Contents I am

Re: Testing File Contents

2011-03-02 Thread Matt
# Untested use strict; use warnings; open my $fh, '', my_file; while($fh){     if ($_ !~ /my_string/) {         # Do something     } } This triggers on EVERY line of the file that does not contain the string. I just want to trigger once if its no where in the file. The other way

Re: Testing File Contents

2011-03-02 Thread Matt
The easiest way in my opinion is to use the 'grep' function like this: my $searchstring=whatever; open CFG, '', $_file || die(could not open file: $_file!); my @data=CFG; close CFG; if ( grep /$searchstring/i, @data ) {  print $searchstring found\n; } This sorta worked. Needed a minor

Re: Testing File Contents

2011-03-02 Thread Brian F. Yulga
On Wed, 2 Mar 2011, Matt wrote: The easiest way in my opinion is to use the 'grep' function like this: my $searchstring=whatever; open CFG, '', $_file || die(could not open file: $_file!); my @data=CFG; close CFG; if ( grep /$searchstring/i, @data ) {  print $searchstring

RE: Testing File Contents

2011-03-02 Thread Ken Slater
From: Brian F. Yulga [mailto:byu...@langly.dyndns.org] On Wed, 2 Mar 2011, Matt wrote: The easiest way in my opinion is to use the 'grep' function like this: my $searchstring=whatever; open CFG, '', $_file || die(could not open file: $_file!); my @data=CFG; close CFG; if ( grep

Re: Testing File Contents

2011-03-02 Thread Uri Guttman
BFY == Brian F Yulga byu...@langly.dyndns.org writes: BFY My apologies if I'm beating a dead horse here, but I'm new to Perl and BFY thought of a slightly different approach: BFY my $searchrx = qr/whatever/; # or q/whatever/ if you don't need regexp BFY @ARGV or die qq/you didn't

Re: Testing File Contents

2011-03-02 Thread Uri Guttman
M == Matt lm7...@gmail.com writes: M I am looking for a simple way to test if a file does not contain a M string. This is on a linux box. M if myfile does not contain mystring { M #do_something; M } M The file is basically a list of names and I want to test that a M certain

Re: Testing File Contents

2011-03-02 Thread shawn wilson
On Wed, Mar 2, 2011 at 3:37 PM, Uri Guttman u...@stemsystems.com wrote: M == Matt lm7...@gmail.com writes: 2 lines will do it: use File::Slurp ; unless( read_file( $file ) =~ /$whatever/ ) { # do something } what's better about File::Slurp than just

Re: Testing File Contents

2011-03-02 Thread Uri Guttman
sw == shawn wilson ag4ve...@gmail.com writes: sw On Wed, Mar 2, 2011 at 3:37 PM, Uri Guttman u...@stemsystems.com wrote: M == Matt lm7...@gmail.com writes: 2 lines will do it: use File::Slurp ; unless( read_file( $file ) =~ /$whatever/ ) { # do something }

Re: Testing File Contents

2011-03-02 Thread shawn wilson
On Mar 2, 2011 4:47 PM, Uri Guttman u...@stemsystems.com wrote: sw == shawn wilson ag4ve...@gmail.com writes: sw On Wed, Mar 2, 2011 at 3:37 PM, Uri Guttman u...@stemsystems.com wrote: M == Matt lm7...@gmail.com writes: 2 lines will do it: use File::Slurp ; unless(

RE: Testing File Contents

2011-03-02 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Matt [mailto:lm7...@gmail.com] Sent: Wednesday, March 02, 2011 11:25 To: beginners@perl.org Subject: Re: Testing File Contents # Untested use strict; use warnings; open my $fh, '', my_file; while($fh){     if ($_ !~ /my_string/) {         # Do something

Re: Testing File Contents

2011-03-02 Thread Uri Guttman
sw == shawn wilson ag4ve...@gmail.com writes: less code, much much faster. you loop over each line. my code does one regex call and stays inside perl for that. inside perl is usually faster than running perl op. use the benchmark module and look at the difference. it will be

Re: Testing File Contents

2011-03-02 Thread Rob Dixon
On 02/03/2011 17:55, Matt wrote: I am looking for a simple way to test if a file does not contain a string. This is on a linux box. if myfile does not contain mystring { #do_something; } The file is basically a list of names and I want to test that a certain name is not in there. Is

Re: Testing File Contents

2011-03-02 Thread Uri Guttman
RD == Rob Dixon rob.di...@gmx.com writes: RD On 02/03/2011 17:55, Matt wrote: I am looking for a simple way to test if a file does not contain a string. This is on a linux box. if myfile does not contain mystring { #do_something; } The file is basically a list of

Re: Testing File Contents

2011-03-02 Thread Rob Dixon
On 02/03/2011 23:56, Uri Guttman wrote: RD == Rob Dixonrob.di...@gmx.com writes: RD On 02/03/2011 17:55, Matt wrote: I am looking for a simple way to test if a file does not contain a string. This is on a linux box. if myfile does not contain mystring {

Re: Testing File Contents

2011-03-02 Thread Uri Guttman
RD == Rob Dixon rob.di...@gmx.com writes: RD Thanks Uri. It's midnight and I should be in bed :-/ we should all be in bed! RD Version 2: RD sub file_contains { RD my ($file, $string) = @_; RD open my $fh, '', $file or die $!; RD my %names = map { chomp; ($_ = 1) }

Re: Testing File Contents

2011-03-02 Thread Brian F. Yulga
Ken Slater wrote: From: Brian F. Yulga [mailto:byu...@langly.dyndns.org] On Wed, 2 Mar 2011, Matt wrote: The easiest way in my opinion is to use the 'grep' function like this: my $searchstring=whatever; open CFG, '', $_file || die(could not open file: $_file!); my @data=CFG; close

Re: Testing File Contents

2011-03-02 Thread Brian F. Yulga
Uri Guttman wrote: BFY == Brian F Yulga byu...@langly.dyndns.org writes: BFY My apologies if I'm beating a dead horse here, but I'm new to Perl and BFY thought of a slightly different approach: BFY my $searchrx = qr/whatever/; # or q/whatever/ if you don't need regexp BFY @ARGV or die

Re: Bit testing

2010-11-14 Thread Shlomi Fish
Hi Charles, On Sunday 14 November 2010 01:47:36 C.DeRykus wrote: On Nov 11, 11:27 pm, c...@pobox.com (Chap Harrison) wrote: Not lots shorter but you could use a closure to hide the calculation: my $mask; for my $flags ( ... ) { $mask = sub { return ($flags $_[0]) == $_[0] }

Re: Bit testing

2010-11-14 Thread C.DeRykus
On Nov 13, 3:47 pm, dery...@gmail.com (C.DeRykus) wrote: On Nov 11, 11:27 pm, c...@pobox.com (Chap Harrison) wrote: I'm almost embarrassed to ask this, but I can't figure out a simple way to construct a switch ('given') statement where the 'when' clauses involve bit-testing. Here's

Re: Bit testing

2010-11-14 Thread Chap Harrison
On Nov 14, 2010, at 4:36 AM, C.DeRykus wrote: And now it seems a little bit inelegant to redefine the closure each time through the loop. for my $flags ( ... ) { my $mask = sub { return ($flags $_[0]) == $_[0] }; given( $flags ) { when ( $mask-($one_and_three)

Re: Bit testing

2010-11-14 Thread C.DeRykus
On Nov 14, 1:11 am, shlo...@iglu.org.il (Shlomi Fish) wrote: Hi Charles, On Sunday 14 November 2010 01:47:36 C.DeRykus wrote: On Nov 11, 11:27 pm, c...@pobox.com (Chap Harrison) wrote: Not lots shorter but you could use a closure to hide the calculation: my $mask; for my $flags (

Re: Bit testing

2010-11-13 Thread C.DeRykus
On Nov 11, 11:27 pm, c...@pobox.com (Chap Harrison) wrote: I'm almost embarrassed to ask this, but I can't figure out a simple way to construct a switch ('given') statement where the 'when' clauses involve bit-testing. Here's the only way I've figured out to build a switch statement

Bit testing

2010-11-11 Thread Chap Harrison
I'm almost embarrassed to ask this, but I can't figure out a simple way to construct a switch ('given') statement where the 'when' clauses involve bit-testing. Here's the only way I've figured out to build a switch statement that does the trick. It seems unusually wordy, which makes me think

Re: Bit testing

2010-11-11 Thread Uri Guttman
CH == Chap Harrison c...@pobox.com writes: CH I'm almost embarrassed to ask this, but I can't figure out a CH simple way to construct a switch ('given') statement where the CH 'when' clauses involve bit-testing. Here's the only way I've CH figured out to build a switch statement

testing tcp connection

2010-09-01 Thread Kammen van, Marco, Springer SBM NL
Hi All, I have an issue when something goes wrong with the client that's trying to connect. 9 out of 10 times this works fine, but there are odd situations where $clientip doesn't get filled in, which leaves me with a connection I can't do anything with... I tried to use close($client) to

AW: testing tcp connection

2010-09-01 Thread Thomas Bätzler
Kammen van, Marco, Springer SBM NL marco.vankam...@springer.com asked: I have an issue when something goes wrong with the client that's trying to connect. 9 out of 10 times this works fine, but there are odd situations where $clientip doesn't get filled in, which leaves me with a connection

RE: testing tcp connection

2010-09-01 Thread Kammen van, Marco, Springer SBM NL
-Original Message- From: Thomas Bätzler [mailto:t.baetz...@bringe.com] Sent: Wednesday, September 01, 2010 8:57 AM To: beginners@perl.org Cc: Kammen van, Marco, Springer SBM NL Subject: AW: testing tcp connection Kammen van, Marco, Springer SBM NL marco.vankam...@springer.com asked: I

Re: testing if divisible by?

2010-05-03 Thread Jay Savage
On Sat, May 1, 2010 at 7:45 AM, Philip Potter philip.g.pot...@gmail.com wrote: On 1 May 2010 12:15, Paul opensou...@unixoses.com wrote: Hello all.  How can I test to see if a number is divisible by say, 40? Thanks. Use the modulo operator %. Given integers $x and $y, the expression $x % $y

Re: testing if divisible by?

2010-05-03 Thread Philip Potter
$x and $y, the expression $x And there's the rub: number ne integer. % is fine if you're only interested in integers, but if you want to compare other numbers use fmod() from POSIX.pm:    perl -MPOSIX -wle 'print POSIX::fmod(35, 17.5)' fmod is a fine replacement for % in general for testing

testing if divisible by?

2010-05-01 Thread Paul
Hello all. How can I test to see if a number is divisible by say, 40? Thanks. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: testing if divisible by?

2010-05-01 Thread Shawn H Corey
Paul wrote: Hello all. How can I test to see if a number is divisible by say, 40? Thanks. See `perldoc perlop` and search for /Multiplicative Operators/ Read the part about the % operator. -- Just my 0.0002 million dollars worth, Shawn Programming is as much about organization

Re: testing if divisible by?

2010-05-01 Thread Philip Potter
On 1 May 2010 12:15, Paul opensou...@unixoses.com wrote: Hello all.  How can I test to see if a number is divisible by say, 40? Thanks. Use the modulo operator %. Given integers $x and $y, the expression $x % $y gives the remainder when $x is divided by $y. As a result, if (and only if) $x is

Re: testing if divisible by?

2010-05-01 Thread Jamie L. Penman-Smithson
On Sat, 2010-05-01 at 07:15 -0400, Paul wrote: Hello all. How can I test to see if a number is divisible by say, 40? Use the modulo operator: my $a = 40; my $b = 1; if ($a % $b == 0) { print $b is divisible by $a\n; } -j -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For

Re: testing if divisible by?

2010-05-01 Thread Uri Guttman
JLP == Jamie L Penman-Smithson li...@silverdream.org writes: JLP On Sat, 2010-05-01 at 07:15 -0400, Paul wrote: Hello all. How can I test to see if a number is divisible by say, 40? JLP Use the modulo operator: JLP my $a = 40; JLP my $b = 1; JLP if ($a % $b == 0) { no need for

Testing with Perl and Selenium RC

2010-03-12 Thread Bob McConnell
Does anyone here know where I can find information about using Perl to run tests with Selenium Remote Control? There is no Perl specific information in their documentation or SDK and they don't appear to have any Perl developers involved in the project any more. I pasted together some of my notes

RE: Testing with Selenium

2009-09-23 Thread Bob McConnell
From: Steve Bertrand Steve Bertrand wrote: Bob McConnell wrote: I have begun the task of automating functional tests for some of our web servers. I have had some success using Selenium IDE in Firefox to capture input sequences, exporting them to Perl scripts, then using the Se remote

Testing with Selenium

2009-09-22 Thread Bob McConnell
Good morning, I have begun the task of automating functional tests for some of our web servers. I have had some success using Selenium IDE in Firefox to capture input sequences, exporting them to Perl scripts, then using the Se remote control server to execute them. But I have run into one minor

Re: Testing with Selenium

2009-09-22 Thread Steve Bertrand
Bob McConnell wrote: Good morning, I have begun the task of automating functional tests for some of our web servers. I have had some success using Selenium IDE in Firefox to capture input sequences, exporting them to Perl scripts, then using the Se remote control server to execute them. But

Re: Testing with Selenium

2009-09-22 Thread Steve Bertrand
Steve Bertrand wrote: Bob McConnell wrote: Good morning, I have begun the task of automating functional tests for some of our web servers. I have had some success using Selenium IDE in Firefox to capture input sequences, exporting them to Perl scripts, then using the Se remote control

Re: Testing with Selenium

2009-09-22 Thread Paul Johnson
On Tue, Sep 22, 2009 at 02:12:31PM -0400, Bob McConnell wrote: Good morning, I have begun the task of automating functional tests for some of our web servers. I have had some success using Selenium IDE in Firefox to capture input sequences, exporting them to Perl scripts, then using the Se

Testing a scalier for two possible values at once

2009-05-13 Thread Adam Jimerson
I need to test a scalier to see if its value is not two possibilities, because this test is being done inside a while loop I can not use an elsif statement without things getting ugly. I have tried it like this if ($scalier nq 'A') || ($scalier nq 'B') { but that just gave me a syntax error

Re: Testing a scalier for two possible values at once

2009-05-13 Thread Alexander Koenig
You wrote on 05/13/2009 02:17 AM: I need to test a scalier to see if its value is not two possibilities, because this test is being done inside a while loop I can not use an elsif statement without things getting ugly. I have tried it like this if ($scalier nq 'A') || ($scalier nq 'B') {

Re: Testing a scalier for two possible values at once

2009-05-13 Thread Paul Johnson
On Wed, May 13, 2009 at 11:25:40AM +0200, Alexander Koenig wrote: You wrote on 05/13/2009 02:17 AM: I need to test a scalier to see if its value is not two possibilities, because this test is being done inside a while loop I can not use an elsif statement without things getting ugly. I

Re: Testing a scalier for two possible values at once

2009-05-13 Thread John W. Krahn
Adam Jimerson wrote: I need to test a scalier to see if its value is not two possibilities, because this test is being done inside a while loop I can not use an elsif statement without things getting ugly. I have tried it like this if ($scalier nq 'A') || ($scalier nq 'B') { but that just

Re: disk performance or destructive testing

2008-12-20 Thread Yogesh Sawant
On Dec 17, 1:31 am, ben.pe...@gmail.com (Ben Perl) wrote: Does anyone know any perl module for validating or do some desctructive testing on disks on Linux platform? found a few constructive ones, but nothing that would be destructive. i doubt that you would find any at CPAN. check if any

disk performance or destructive testing

2008-12-16 Thread ben perl
Does anyone know any perl module for validating or do some desctructive testing on disks on Linux platform? Thanks, -Ben

Unit testing

2008-08-22 Thread Vyacheslav Karamov
Hi All! I need to add unit tests to my project which I will start soon. I'm using latest ActivePerl in Win32 (because I have to) and I installed Test::Unit::Lite through ppm.bat. But! When I tried to run example test: #!/usr/bin/perl -w use strict; use warnings; use File::Basename; use

Testing for a condition immediately after require

2008-06-06 Thread Travis Thornhill
I want to be able to tag a module with one or more tags that can be tested for after requiring it. nbsp; require 'module'; lt;test for existence of tags in 'module'gt; nbsp; Any ideas on the best way to accomplish this? nbsp; Thanks in advance nbsp;

Re: Testing an array for a match

2008-04-10 Thread John W. Krahn
Lou Hernsen wrote: Hallo Hello, I have an array @Treasures and I want to match anywhere in it for /:1:2:3:/ can I if (@Treasures =~ /:1:2:3:/){} or do i have to change (@Treasures to $Treasures and then $Treasures = @Treasures ; if ($Treasures =~ /:1:2:3:/){} if ( grep /:1:2:3:/,

Testing an array for a match

2008-04-10 Thread Lou Hernsen
Hallo I have an array @Treasures and I want to match anywhere in it for /:1:2:3:/ can I if (@Treasures =~ /:1:2:3:/){} or do i have to change (@Treasures to $Treasures and then $Treasures = @Treasures ; if ($Treasures =~ /:1:2:3:/){} Just thought I'd ask first, I have to take mother in law to

Re: Testing an array for a match

2008-04-10 Thread Jeff Pang
On Thu, Apr 10, 2008 at 1:07 AM, Lou Hernsen [EMAIL PROTECTED] wrote: Hallo I have an array @Treasures and I want to match anywhere in it for /:1:2:3:/ can I if (@Treasures =~ /:1:2:3:/){} or do i have to change (@Treasures to $Treasures and then $Treasures = @Treasures ; if

Re: Testing an array for a match

2008-04-10 Thread itshardtogetone
Hi, How about this :- foreach (@Treasures){ if ($_=~ /:1:2:3:/){ print do your stuffs here\n: } } - Original Message - From: Lou Hernsen [EMAIL PROTECTED] To: beginners@perl.org; [EMAIL PROTECTED] Sent: Thursday, April 10, 2008 1:07 AM Subject: Testing an array

Testing an array for a match

2008-04-09 Thread Lou Hernsen
Hallo I have an array @Treasures and I want to match anywhere in it for /:1:2:3:/ can I if (@Treasures =~ /:1:2:3:/){} or do i have to change (@Treasures to $Treasures and then $Treasures = @Treasures ; if ($Treasures =~ /:1:2:3:/){} Just thought I'd ask first, I have to take mother in law to

testing Non_SOAP webservices

2008-02-26 Thread perl pra
Hi gurus, I need to test non-SOAP webservices.Can anybody tell how could i do that in perl. basically i need to send the following xml file as pay load to the url. - ?xml

Re: testing Non_SOAP webservices

2008-02-26 Thread Jenda Krynicky
From: perl pra [EMAIL PROTECTED] Hi gurus, I need to test non-SOAP webservices.Can anybody tell how could i do that in perl. basically i need to send the following xml file as pay load to the url. Have a look at the LWP modules. You'll need either LWP::Simple or LWP::UserAgent. Jenda

Re: testing for a file type

2007-12-20 Thread Chas. Owens
On Dec 19, 2007 7:01 PM, Jenda Krynicky [EMAIL PROTECTED] wrote: snip I did not install it yet so I can't check but I think you have it wrong. According to the docs you point to @ARGV ~~ /\.mdb\z/ is equivalent to grep /\.mdb\z/, @ARGV which is true whenever at least one item in

Re: testing for a file type

2007-12-19 Thread Chas. Owens
On Dec 18, 2007 4:49 PM, Rob Dixon [EMAIL PROTECTED] wrote: snip if (grep { not /\.mdb\z/ } @ARGV) { print All parameters must be MDB files\n; exit; } snip Or in Perl 5.10, coming to stores near you soon*, you can use the smart match operator: @ARGV ~~ /\.mdb\z/ or die All

Re: testing for a file type

2007-12-19 Thread Jenda Krynicky
From: Chas. Owens [EMAIL PROTECTED] On Dec 18, 2007 4:49 PM, Rob Dixon [EMAIL PROTECTED] wrote: snip if (grep { not /\.mdb\z/ } @ARGV) { print All parameters must be MDB files\n; exit; } snip Or in Perl 5.10, coming to stores near you soon*, you can use the smart match

testing for a file type

2007-12-18 Thread goldtech
Hi, If I have: ... foreach (@ARGV) { print do something only to .mdb files; } I could use File::Basename's fileparse and test for the file extension and put a big if statement around or in the foreach loop. So if a user puts a non .mdb file argument on the cmd line it won't process and

Re: testing for a file type

2007-12-18 Thread Ankur Gupta
On Dec 18, 2007 10:08 PM, goldtech [EMAIL PROTECTED] wrote: Hi, If I have: ... foreach (@ARGV) { print do something only to .mdb files; } I could use File::Basename's fileparse and test for the file extension and put a big if statement around or in the foreach loop. So if a user

Re: testing for a file type

2007-12-18 Thread Rob Dixon
goldtech wrote: Hi, If I have: ... foreach (@ARGV) { print do something only to .mdb files; } I could use File::Basename's fileparse and test for the file extension and put a big if statement around or in the foreach loop. So if a user puts a non .mdb file argument on the cmd line it

testing if hardware is avalible

2007-07-20 Thread Gregory Machin
Hi can you advise on the best way test if a usb modem is plugged in ? I though about checking if the file/node /dev/ttyACM0 is present, as it's created when the device is plugged in using open (TEST, /dev/tty/ACM0); but just concecned if i do this while the device is acitive it will cause it to

Re: testing if hardware is avalible

2007-07-20 Thread Tom Phoenix
On 7/19/07, Gregory Machin [EMAIL PROTECTED] wrote: can you advise on the best way test if a usb modem is plugged in ? I'd look at the socket. But if you're trying to do this via Perl, the best answer is the same way you'd do it via C, INTERCAL, or any other language. In other words, you may

Re: testing if hardware is avalible

2007-07-20 Thread Chas Owens
On 7/20/07, Gregory Machin [EMAIL PROTECTED] wrote: Hi can you advise on the best way test if a usb modem is plugged in ? I though about checking if the file/node /dev/ttyACM0 is present, as it's created when the device is plugged in using open (TEST, /dev/tty/ACM0); but just concecned if i do

DBD::Oracle for perl testing issues

2007-07-05 Thread Dan King
I am attempting to install DBD::Oracle for Perl. I am having some difficulties though. During the make test procedure a number of my tests fail. One of them is the 10general.t test. It fails on lines 31 and 32 which has is system(exit 1;), 18, 'system exit 1 should return 256'; is system(exit

Re: DBD::Oracle for perl testing issues

2007-07-05 Thread Tom Phoenix
On 7/5/07, Dan King [EMAIL PROTECTED] wrote: I am attempting to install DBD::Oracle for Perl. I am having some difficulties though. During the make test procedure a number of my tests fail. One of them is the 10general.t test. It fails on lines 31 and 32 which has is system(exit 1;), 18,

testing return values

2007-04-22 Thread Mike Lesser
Hiya. I'm looking for the correct Perl style for testing and storing a return value in a control statement. The solution in any other language is pretty obvious, but I get the distinct impression that there's a 'right' way in Perl... Let's say I want to test a scalar returned from

Re: testing return values

2007-04-22 Thread yitzle
for testing and storing a return value in a control statement. The solution in any other language is pretty obvious, but I get the distinct impression that there's a 'right' way in Perl... Let's say I want to test a scalar returned from a subroutine, and also keep a copy for my own use: $scalar

Re: testing return values

2007-04-22 Thread Rob Dixon
Mike Lesser wrote: Hiya. I'm looking for the correct Perl style for testing and storing a return value in a control statement. The solution in any other language is pretty obvious, but I get the distinct impression that there's a 'right' way in Perl... Let's say I want to test a scalar

Need help Win#2 Directory Walk and testing for file access

2006-09-12 Thread Gallagher, Tim F \(NE\)
I need to move 3TB of data to a new SAN. I have to make sure that I have the correct tights to move the data so I want to test my data before the move. I want to walk the data and see if I have access to all the files. I am not sure how to test the files to see if I have access or not. I don't

Re: Need help Win#2 Directory Walk and testing for file access

2006-09-12 Thread D. Bolliger
Gallagher, Tim F (NE) am Dienstag, 12. September 2006 20:39: I need to move 3TB of data to a new SAN. I have to make sure that I have the correct tights to move the data so I want to test my data before the move. I want to walk the data and see if I have access to all the files. I am not

How to use Perl for API testing

2006-07-10 Thread Suja Emmanuel
Hi, I want to use PERL for API testing, i.e., I want to call different URLs through the browser. How much is possin The information contained in, or attached to, this e-mail, contains confidential information and is intended solely for the use of the individual or entity

RE: How to use Perl for API testing

2006-07-10 Thread Jeff Peng
Have you took a look at CPAN?for example,LWP::UserAgent. I want to use PERL for API testing, i.e., I want to call different URLs through the browser. How much is possin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http

Re: How to use Perl for API testing

2006-07-10 Thread Matt Johnson
, I want to use PERL for API testing, i.e., I want to call different URLs through the browser. How much is possin The information contained in, or attached to, this e-mail, contains confidential information and is intended solely for the use of the individual or entity to whom

How to use Perl for API testing

2006-07-10 Thread Suja Emmanuel
Hi, I want to use PERL for API testing, i.e., I want to call different URLs through the browser. I am new to Perl. Can you help me to write a script to call many URLs through browser. Thanks in advance, Suja Emmanuel. The information contained in, or attached to, this e

RE: How to use Perl for API testing

2006-07-10 Thread Timothy Johnson
Are you testing on IE? There is an Win32::IEAutomation module that should be able to handle what you want if IE is the browser you want to test. -Original Message- From: Suja Emmanuel [mailto:[EMAIL PROTECTED] Sent: Sunday, July 09, 2006 10:16 PM To: beginners@perl.org Subject: How

RE: How to use Perl for API testing

2006-07-10 Thread Jason Trebilcock
-Original Message- From: Suja Emmanuel [mailto:[EMAIL PROTECTED] Sent: Sunday, July 09, 2006 10:16 PM To: beginners@perl.org Subject: How to use Perl for API testing Hi, I want to use PERL for API testing, i.e., I want to call different URLs through the browser

testing perl

2006-01-08 Thread Saurabh_Agarwal
How can we test our Perl script? DISCLAIMER: This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or

Re: testing perl

2006-01-08 Thread Owen Cook
On Mon, 9 Jan 2006, Saurabh_Agarwal wrote: How can we test our Perl script? At the command prompt run #perl -c script.pl If there are no errors, it compiles ok If there are errors, fix them then run #perl script.pl and see if your logig is correct HTH Owen -- To unsubscribe,

Re: testing perl

2006-01-08 Thread Chris Devers
On Mon, 9 Jan 2006, Saurabh_Agarwal wrote: How can we test our Perl script? We can test our Perl script carefully. -- Chris Devers DO NOT LEAVE IT IS NOT REAL -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

RE: testing perl

2006-01-08 Thread Saurabh_Agarwal
I want to know how to use perl -d -Original Message- From: Owen Cook [mailto:[EMAIL PROTECTED] Sent: Monday, January 09, 2006 10:51 AM To: Saurabh_Agarwal Cc: beginners@perl.org Subject: Re: testing perl On Mon, 9 Jan 2006, Saurabh_Agarwal wrote: How can we test our Perl script

RE: testing perl

2006-01-08 Thread Chris Devers
On Mon, 9 Jan 2006, Saurabh_Agarwal wrote: I want to know how to use perl -d perldoc perldebug -- Chris Devers DO NOT LEAVE IT IS NOT REAL -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

  1   2   3   4   >