Re: Test

2018-11-04 Thread SATYABRATA KARAN
Hi Shravan, Please send the complex hash here, so we can tell you exactly how to substitute it. Regards, Satya

Re: Test

2018-11-04 Thread Andrew Solomon
Hi Shravan, If you go to this page and scroll down to the code snippet with Data::Rmap I think this may answer your question. https://www.linuxcareer.com/perl-as-a-career-option For further detail see https://metacpan.org/pod/Data::Rmap On Sun, Nov 4, 2018 at 4:24 AM Uri Guttman wrote: > On

Re: Test

2018-11-03 Thread Uri Guttman
On 10/27/18 6:27 AM, Shravan Uppin wrote: Hi do anyone know how to substitute for string in complex hashes i am not sure what you mean with that question. a string substition (the s/// op) can be done on any scalar. if you can access the scalar in a complex hash, you can do an s/// on it. o

Re: Test

2018-11-03 Thread Shravan Uppin
Hi do anyone know how to substitute for string in complex hashes Thank you Shravano On Tue, 23 Oct 2018, 19:33 Shravan Uppin, wrote: > Thank You > shravankumar >

Re: Test::More is_deeply failed data

2014-02-11 Thread Paul Johnson
On Tue, Feb 11, 2014 at 01:17:15PM -0500, shawn wilson wrote: > Is there a way to see the data difference when is_deeply fails? proove > -d doesn't give me the structure that fails. I end up 'print STDERR > "one " . Dumper($foo); print STDERR 'two " . Dumper($bar);' which just > doesn't seem like t

Re: Test::More is_deeply failed data

2014-02-11 Thread shawn wilson
Test::Differences looks like what I want. Also he documents gracefully falling back to is_deeply. I see no issue requiring it but the alternative is cool. On Feb 11, 2014 2:02 PM, "Shlomi Fish" wrote: > Hi Shawn, > > On Tue, 11 Feb 2014 13:17:15 -0500 > shawn wilson wrote: > > > Is there a way t

Re: Test::More is_deeply failed data

2014-02-11 Thread Shlomi Fish
Hi Shawn, On Tue, 11 Feb 2014 13:17:15 -0500 shawn wilson wrote: > Is there a way to see the data difference when is_deeply fails? proove > -d doesn't give me the structure that fails. I end up 'print STDERR > "one " . Dumper($foo); print STDERR 'two " . Dumper($bar);' which just > doesn't seem

Re: Test::More is_deeply failed data

2014-02-11 Thread John SJ Anderson
On Tue, Feb 11, 2014 at 10:17 AM, shawn wilson wrote: > Is there a way to see the data difference when is_deeply fails? So, with this code: #! perl use Test::More; my $a = { foo => {bar => { baz => 'bargle' }}}; my $b = { foo => {baz => { bar => 'bargle' }}}; is_deeply( $a , $b ); done_testi

Re: Test automation using perl or shell

2013-09-10 Thread Jim Gibson
On Sep 10, 2013, at 1:25 AM, Lalit Deshmukh wrote: > Hi, > > i have implemented 50 shell program to test. now i want to run all these > shell program one by one(in short test automation) (once first program > getting executed then next will start). please let me know how to do this? in > UNIX

Re: Test automation using perl or shell

2013-09-10 Thread Michael Rasmussen
On Tue, Sep 10, 2013 at 01:25:22AM -0700, Lalit Deshmukh wrote: > i have implemented 50 shell program to test. now i want to run all these > shell program one by one(in short test automation) (once first program > getting executed then next will start). please let me know how to do this? > in UNIX

Re: Test automation using perl or shell

2013-09-10 Thread Shekar
Hello Lalit, This question sounds more nearer to Shell scripting than Perl. No offence, you can do this in Perl too, but since underlaying test scripts are shell based (which you mentioned as 'i have implemented 50 shell program to test' ), i would suggest you to write a wrapper shell script which

Re: Test Mail

2012-08-03 Thread Jeff Pang
congratulation, you have got it~ Fri, 3 Aug 2012 14:02:25 +0530 от Anitha Sreejith Victor : I want to subscribe to this perl forum thanks, Anitha -- Jeff Pang jeffp...@mail.ru

Re: Test Mail

2012-08-03 Thread Owen
> I want to subscribe to this perl forum Look at the message headers... List-Subscribe: -- Owen -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: test contents of variable using alarm()

2010-08-25 Thread Chas. Owens
On Wed, Aug 25, 2010 at 02:39, Kammen van, Marco, Springer SBM NL wrote: > Original Message- > From: Chas. Owens [mailto:chas.ow...@gmail.com] > Sent: Friday, August 20, 2010 4:07 PM > To: Kammen van, Marco, Springer SBM NL > Cc: beginners@perl.org > Subject: Re: test co

RE: test contents of variable using alarm()

2010-08-24 Thread Kammen van, Marco, Springer SBM NL
Original Message- From: Chas. Owens [mailto:chas.ow...@gmail.com] Sent: Friday, August 20, 2010 4:07 PM To: Kammen van, Marco, Springer SBM NL Cc: beginners@perl.org Subject: Re: test contents of variable using alarm() On Fri, Aug 20, 2010 at 04:34, Kammen van, Marco, Springer SBM NL

Re: test contents of variable using alarm()

2010-08-20 Thread Chas. Owens
On Fri, Aug 20, 2010 at 04:34, Kammen van, Marco, Springer SBM NL wrote: > Hi All, > > I want to use timers to check if certain variables are set and if not > send some data back to a client... > > Been searching for this a while now, but all I can find on alarm are > examples on timing out comman

Re: Test if directory is not empty

2010-03-07 Thread Harry Putnam
Shawn H Corey writes: > Harry Putnam wrote: >> So it needs to be up to the user but most often any files in the >> directory will not be of concern. In fact, thinking about that the script should not only ask permission, but should probably should offer to clear the directory before making a

Re: Test if directory is not empty

2010-03-07 Thread Shawn H Corey
Harry Putnam wrote: > So it needs to be up to the user but most often any files in the > directory will not be of concern. Well, if you're not worried about hidden files, you could use glob: my $count = scalar glob( "$dir/*" ); -- Just my 0.0002 million dollars worth, Shawn Programming

Re: Test if directory is not empty

2010-03-07 Thread Harry Putnam
"Uri Guttman" writes: >> "HP" == Harry Putnam writes: > > HP> But all I'm asking here is for the easiest way to see if the receiving > HP> directory is empty. > > HP> The code I've devised seems pretty clunky (I haven't tested the script > HP> yet since I'm writing several other part

Re: Test if directory is not empty

2010-03-07 Thread Harry Putnam
Robert Wohlfarth writes: > The "-e" test will tell you if the target file already exists. For example: > if (-e $copyToFile) { > # Add extension here... > } Nice... much better. That test would come in handy instead of comparing the whole list of files to the current one incoming. It wou

Re: Test if directory is not empty

2010-03-07 Thread Robert Wohlfarth
On Sun, Mar 7, 2010 at 11:37 AM, Harry Putnam wrote: > I want to know if the receiving directory is empty of actual files. > Since if it is not; then first the user must be asked if she wants to > continue, if so, then a subfunction must be employed to ensure nothing > is clobbered. > > The subfu

Re: Test if directory is not empty

2010-03-07 Thread Uri Guttman
> "HP" == Harry Putnam writes: HP> But all I'm asking here is for the easiest way to see if the receiving HP> directory is empty. HP> The code I've devised seems pretty clunky (I haven't tested the script HP> yet since I'm writing several other parts right now, so not even sure HP>

Re: Test if directory is not empty

2010-03-07 Thread Harry Putnam
Shawn H Corey writes: Harry Putnam wrote: >> Is there a simple test to determine if a directory is empty or not? >> >> Or do you have to opendir, readdir, or something similar with a full >> block. >> >> > > That depends on what you mean by empty. On Linux, even empty > directories have . an

Re: Test if directory is not empty

2010-03-07 Thread Shawn H Corey
Harry Putnam wrote: > Is there a simple test to determine if a directory is empty or not? > > Or do you have to opendir, readdir, or something similar with a full > block. > > That depends on what you mean by empty. On Linux, even empty directories have . and .. Why do you want to test for th

RE: Test file is not readable, while running "make test"

2010-01-04 Thread Hack, Gabi (ext)
> > dharmashankar subramanian wrote: > > > Hi Shawn, > > > It appears to me that the directory has both read, as > well as execute > > > permissions (for me). > > > > > See below, the output of 'ls -al' inside the directory. > > > > > $ ls -al > > > total 28 > > > drwxr-s--x  3 shankar shankar 204

Re: Test file is not readable, while running "make test"

2009-12-31 Thread dharmashankar subramanian
Thanks Jeremiah. I downloaded local-lib-1.004009, from CPAN. (I had already installed the latest CPAN module myself into a local directory that I gave higher precedence than the default Perl search paths. This is CPAN-1.9402. Also, my local install directory is: /u/shankar/my_test/perltools/MyLibs

Re: Test file is not readable, while running "make test"

2009-12-31 Thread Jeremiah Foster
On Dec 30, 2009, at 16:05, Shankar wrote: > On Dec 30, 9:39 am, shlo...@iglu.org.il (Shlomi Fish) wrote: >> On Wednesday 30 Dec 2009 08:12:24 Shankar wrote: > > Thanks a lot for the replies. > I'll check to see if I may update perl. > > If I'm unable, is it okay to do the following: > 1. Run th

Re: Test file is not readable, while running "make test"

2009-12-31 Thread Shankar
On Dec 30, 9:39 am, shlo...@iglu.org.il (Shlomi Fish) wrote: > On Wednesday 30 Dec 2009 08:12:24 Shankar wrote: > > > Hello, > > Hi Shankar. > > > (Firstly, Thanks to Matt Trout for pointing me to this forum. I re- > > post my question below). > > > I'm using perl on AIX, and my version is v5.8.2.

Re: Test file is not readable, while running "make test"

2009-12-31 Thread Shankar
On Dec 30, 9:50 am, shawnhco...@gmail.com (Shawn H Corey) wrote: > dharmashankar subramanian wrote: > > Hi Shawn, > > It appears to me that the directory has both read, as well as execute > > permissions (for me). > > > See below, the output of 'ls -al' inside the directory. > > > $ ls -al > > tota

Re: Test file is not readable, while running "make test"

2009-12-31 Thread dharmashankar subramanian
Thanks Jeremiah. The /t folder is physically at the same level as where the tar ball was uncompressed. i.e. for example, in say, Encode-2.39. (see the last but one line of the output below. The folder t is present). $ ls -al total 364 drwxr-s--x 16 shankar shankar 2048 2009-12-29 12:49 . drwxr-

Re: Test file is not readable, while running "make test"

2009-12-30 Thread Jeremiah Foster
On Dec 30, 2009, at 7:12, Shankar wrote: > Hello, > > I'm using perl on AIX, and my version is v5.8.2. I know it is no help to say you should upgrade your perl or your OS, but sometimes that makes a huge difference in your day to day perl programming. :) > (Also, I'm a regular user, with no wr

Re: Test file is not readable, while running "make test"

2009-12-30 Thread Shawn H Corey
dharmashankar subramanian wrote: > Hi Shawn, > It appears to me that the directory has both read, as well as execute > permissions (for me). > > See below, the output of 'ls -al' inside the directory. > > > > $ ls -al > total 28 > drwxr-s--x 3 shankar shankar 2048 2005-02-14 11:24 . > drwxr-s-

Re: Test file is not readable, while running "make test"

2009-12-30 Thread Shlomi Fish
On Wednesday 30 Dec 2009 08:12:24 Shankar wrote: > Hello, > Hi Shankar. > (Firstly, Thanks to Matt Trout for pointing me to this forum. I re- > post my question below). > > I'm using perl on AIX, and my version is v5.8.2. 5.8.2 is incredibly old and broken. There are already perl-5.8.9 and pe

Re: Test file is not readable, while running "make test"

2009-12-30 Thread Shawn H Corey
Shankar wrote: > 1. perl Makefile.PL > 2. make > 3. make test > 4. make install (This fails, I think, because I don't have any root or > super user permissions to make a site-wide install. Is that correct? > > Steps 1 and 2 succeeded. > Step 3 in each of the modules that I attempted to install on

Re: Test::HTTPStatus

2009-02-20 Thread Gunnar Hjalmarsson
Ganesh Babu N wrote: I am testing the weblinks for connectivity using Test::HTTPStatus module. I could able to test 187 and in those 165 links are success and 22 links are failed. When I test manually by entering the weblink in the browser out of 22, 5 weblinks are working fine. I am not sure wh

Re: test mail

2008-10-13 Thread Mr. Shawn H. Corey
On Mon, 2008-10-13 at 17:53 +0530, [EMAIL PROTECTED] wrote: > > > > > This e-mail and any files transmitted with it are for the sole use of the > intended recipient(s) and may contain confidential and privileged information. > If you are not the intended recipient, please contact the sender by

Re: test if nth sign of a string is a number

2007-12-01 Thread [EMAIL PROTECTED]
On 1 Dez., 04:20, [EMAIL PROTECTED] (Jeff Pang) wrote: > On Nov 30, 2007 10:56 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > Hello, > > > how can I test if the nth (n=2) sign of a string is a number [0-9]? > > Thank you. > > Hello, > > Given you have this string: $str = "a9d0"; > > you can

Re: test if nth sign of a string is a number

2007-12-01 Thread Dr.Ruud
"Jeff Pang" schreef: > guba: >> how can I test if the nth (n=2) sign of a string is a number [0-9]? > > Given you have this string: $str = "a9d0"; > you can check if the 2nd character is a number or not by: > my $c = substr($str,1,1); > print ($c=~/[0-9]/) ? "a number" : "not a number";

Re: test if nth sign of a string is a number

2007-11-30 Thread Jeff Pang
On Nov 30, 2007 10:56 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello, > > how can I test if the nth (n=2) sign of a string is a number [0-9]? > Thank you. > Hello, Given you have this string: $str = "a9d0"; you can check if the 2nd character is a number or not by: my $c = substr($str,

Re: test if nth sign of a string is a number

2007-11-30 Thread Tom Phoenix
On 11/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > how can I test if the nth (n=2) sign of a string is a number [0-9]? It sounds as if you want to examine a particular character indexed in a string; in Perl that's generally done with the substr() function. You can check whether it's a di

Re: test

2007-10-24 Thread Tom Phoenix
On 10/23/07, Sayed, Irfan (Irfan) <[EMAIL PROTECTED]> wrote: > test Your test messages are failing: They are being distributed to a large group of people who have no need of them. Test messages are about as welcome in this forum as spam would be. If you have a message to send to the list, send _

Re: Test data generation using Perl Scripting.

2007-09-07 Thread John W. Krahn
Chas Owens wrote: On 9/7/07, Beginner <[EMAIL PROTECTED]> wrote: On 7 Sep 2007 at 9:47, Chas Owens wrote: On 9/7/07, Chas Owens <[EMAIL PROTECTED]> wrote: snip #FIXME: this creates invalid dates like 2007-02-30 sub rand_date { sprintf "%04d-%02d-%02d", 2000 + int rand

Re: Test data generation using Perl Scripting.

2007-09-07 Thread Chas Owens
On 9/7/07, Bob McConnell <[EMAIL PROTECTED]> wrote: > How often will int rand 7 == 7? I think the max year will be 2006 in > this case. > > Bob McConnell snip They will be equal roughly zero percent of time (they might actually be equal if there is a bug in the implementation of int, rand, or ==).

RE: Test data generation using Perl Scripting.

2007-09-07 Thread Bob McConnell
How often will int rand 7 == 7? I think the max year will be 2006 in this case. Bob McConnell > -Original Message- > From: Chas Owens [mailto:[EMAIL PROTECTED] > Sent: Friday, September 07, 2007 9:57 AM > To: Beginner > Cc: beginners@perl.org > Subject: Re: Test dat

Re: Test data generation using Perl Scripting.

2007-09-07 Thread Chas Owens
On 9/7/07, Beginner <[EMAIL PROTECTED]> wrote: > On 7 Sep 2007 at 9:47, Chas Owens wrote: > > > On 9/7/07, Chas Owens <[EMAIL PROTECTED]> wrote: > > snip > > > #FIXME: this creates invalid dates like 2007-02-30 > > > sub rand_date { > > > sprintf "%04d-%02d-%02d", > > > 2000

Re: Test data generation using Perl Scripting.

2007-09-07 Thread Beginner
On 7 Sep 2007 at 9:47, Chas Owens wrote: > On 9/7/07, Chas Owens <[EMAIL PROTECTED]> wrote: > snip > > #FIXME: this creates invalid dates like 2007-02-30 > > sub rand_date { > > sprintf "%04d-%02d-%02d", > > 2000 + int rand 7, > > 1 + int rand 12, > >

Re: Test data generation using Perl Scripting.

2007-09-07 Thread Chas Owens
On 9/7/07, Chas Owens <[EMAIL PROTECTED]> wrote: snip > #FIXME: this creates invalid dates like 2007-02-30 > sub rand_date { > sprintf "%04d-%02d-%02d", > 2000 + int rand 7, > 1 + int rand 12, > 1 + int rand 31; > } snip Actually that sub can

Re: Test data generation using Perl Scripting.

2007-09-07 Thread Chas Owens
On 9/7/07, Satya <[EMAIL PROTECTED]> wrote: snip > If it is possible to do it using the perl or any other scripting > language, what would be the approach. snip It is possible; the approach is the same as in all languages: use random numbers to select/build strings that match your needs. For inst

Re: Test if string does not exist in an array.

2007-07-27 Thread Chas Owens
On 7/27/07, snickwad <[EMAIL PROTECTED]> wrote: snip > Not sure of the installation details, as perldoc does nothing. snip Happily, you can read it online: http://perldoc.perl.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.or

Re: Test if string does not exist in an array.

2007-07-27 Thread snickwad
Thanks for the resonses and apologies for the lack of script, and the glaring typo : The area of code for the test is currently - open(ULIST,"/etc/passwd") or die "Could not open /etc/passwd"; @udata=; close(ULIST); sub check_details { return 1 if (grep(/$user/,@udata)); } So the script is co

Re: Test if string does not exist in an array.

2007-07-26 Thread Paul Lalli
On Jul 26, 7:14 am, [EMAIL PROTECTED] (Snickwad) wrote: > Apologies if this is a bit noobie, As a newbie, you may not be aware that Perl comes with a built-in FAQ. You can see the whole thing by typing at your command window: perldoc perlfaq But the specific question you care about is: $ perldoc

Re: Test if string does not exist in an array.

2007-07-26 Thread yaron
Hi, Perl has a built in function that do just that: if (my $username = getpwuid($input_uid)) { print "Founf the user $username\n"; } else { print "No user found\n"; } for help try perldoc -f getpwent perldoc -f getpwnam perldoc -f getpwuid BFN Yaron Kahanovitch - Original Mess

Re: Test if string does not exist in an array.

2007-07-26 Thread Chas Owens
On 7/26/07, snickwad <[EMAIL PROTECTED]> wrote: Apologies if this is a bit noobie, but I have been left with a short window to write a tool and I have had no experience with Perl. Very familiar with Kornshell, and so far my Perl script is going okay. However, I am struggling to get a test working

Re: Test::Class fixture problem

2007-07-02 Thread Adrian Howard
Belated response... On 1 Jul 2007, at 23:19, Ovid wrote: [snip] I've just spent quite a bit of time debugging a problem where a Test::Class setup method was misbehaving. My tests passed, but mysql was spitting out errors directly to STDERR and quite a bit of tracing led me to the following

Re: Test Operator -M

2007-06-03 Thread Tom Phoenix
On 6/3/07, Rodrick Brown <[EMAIL PROTECTED]> wrote: I see this used a lot but never really understod it the documentation also seems very vague. Anyone care to explain the following: -M OPERAND Returns the age of OPERAND in days when the program started. Here's a helpful page: http://perl

Re: Test Operator -M

2007-06-03 Thread Chas Owens
On 6/3/07, Rodrick Brown <[EMAIL PROTECTED]> wrote: I see this used a lot but never really understod it the documentation also seems very vague. Anyone care to explain the following: -M OPERAND Returns the age of OPERAND in days when the program started. snip perl -le 'print "$_ is ", int -M,

Re: Test of scripts with Test::More

2007-04-26 Thread Ken Foskey
On Tue, 2007-04-24 at 14:44 -0400, [EMAIL PROTECTED] wrote: > Hi, > > Recently i wrote a perl module that includes package and a script. > As part of the module sanity tests, I would like to run the script and verify > a success. > For that, I am using Test::More and Test::Simple. > Is there any

Re: test

2007-01-09 Thread Matt Richards
On Tue, 2007-01-09 at 18:45 +0800, Sayed, Irfan (Irfan) wrote: > test it works :) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: test

2007-01-09 Thread Matt Richards
On Tue, 2007-01-09 at 18:45 +0800, Sayed, Irfan (Irfan) wrote: > test it works :) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: test message

2006-12-13 Thread Tom Phoenix
On 12/13/06, derek smith <[EMAIL PROTECTED]> wrote: This is a test... : ) I'm sorry to report that your test failed: It went out to the list, but it had 0% relevant content. Your score is 1 out of a possible 100. Better luck next time! --Tom Phoenix Stonehenge Perl Training -- To unsubscrib

Re: Test::Pod::Coverage

2006-06-05 Thread Peter Scott
On Sun, 04 Jun 2006 16:57:13 +1000, Ken Foskey wrote: > For example how do I ensure that there is a SYNOPSIS and DESCRIPTION > section? Ah, you want something entirely different for that. Specifically, the tests performed by the Perl::Critic::Policy::Documentation::RequirePodSections class in the

Re: Test::Pod::Coverage

2006-06-03 Thread Ken Foskey
AFter a nights sleep, this works... for my $module (glob("*.pm")) { $module =~ s/.pm$//; pod_coverage_ok( $module, "$module test" ); } I still do not understand the parms. I think it can give me the audit check I want but I am not sure. For example how do I ensure that there is

Re: Test::Pod::Coverage

2006-06-03 Thread Ken Foskey
On Sat, 2006-06-03 at 06:25 -0700, Peter Scott wrote: > On Sat, 03 Jun 2006 20:53:35 +1000, Ken Foskey wrote: > > I cannot figure out the how to make this work, this succeeds with no > > documentation in the modules. > > > > #!/usr/bin/perl > > > > # Ensure POD is set up correctly. > > > > use

Re: Test::Pod::Coverage

2006-06-03 Thread Peter Scott
On Sat, 03 Jun 2006 20:53:35 +1000, Ken Foskey wrote: > I cannot figure out the how to make this work, this succeeds with no > documentation in the modules. > > #!/usr/bin/perl > > # Ensure POD is set up correctly. > > use Test::More; > eval "use Test::Pod 1.00"; > plan skip_all => "Test::Pod

Re: Test::Pod::Coverage

2006-06-03 Thread Ken Foskey
On Sat, 2006-06-03 at 08:15 -0400, Ricardo SIGNES wrote: > You probably want: > > all_pod_files_ok(glob("*.pm")); > > I've almost never needed to use anything more than: > > all_pod_files_ok(): > > That finds your perl modules in lib or blib, which is where they should be in > a > standard

Re: Test::Pod::Coverage

2006-06-03 Thread Ricardo SIGNES
* Ken Foskey <[EMAIL PROTECTED]> [2006-06-03T06:53:35] > #!/usr/bin/perl > # Ensure POD is set up correctly. > use Test::More; > eval "use Test::Pod 1.00"; > plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; > all_pod_files_ok( map( glob( "*.pm" ), s/.pm$//) ); Your map doesn't ma

Re: test/debugging modules that are duplicates of existing modules.

2005-10-13 Thread John Doe
Tom Allison am Donnerstag, 13. Oktober 2005 12.52: > I'm pretty sure I'm not doing this right. > > I have two modules of the same name, current version and future version, > in two different directories. > > $HOME/test/Module1.pm > $HOME/test/Module2.pm > $HOME/lib/Module1.pm > $HOME/lib/Module2.pm

Re: test/debugging modules that are duplicates of existing modules.

2005-10-13 Thread Peter Scott
On Thu, 13 Oct 2005 06:52:52 -0400, Tom Allison wrote: > I have two modules of the same name, current version and future version, > in two different directories. > > $HOME/test/Module1.pm > $HOME/test/Module2.pm > $HOME/lib/Module1.pm > $HOME/lib/Module2.pm > > and another module: $HOME/lib/Mod

Re: TEST

2005-10-06 Thread Wiggins d'Anconia
Peter Scott wrote: > On Thu, 06 Oct 2005 05:42:59 -0400, Tom Allison wrote: > >>>So make tests that just run the scripts and then examine the outputs. >>>If there are unwanted side effects you can't undo from the test then >>>you need to modify the script in some way. >> >>Is this where 'do' come

Re: TEST

2005-10-06 Thread Peter Scott
On Thu, 06 Oct 2005 05:42:59 -0400, Tom Allison wrote: >> So make tests that just run the scripts and then examine the outputs. >> If there are unwanted side effects you can't undo from the test then >> you need to modify the script in some way. > > Is this where 'do' comes into use? No, I'd use

Re: TEST

2005-10-06 Thread Tom Allison
So make tests that just run the scripts and then examine the outputs. If there are unwanted side effects you can't undo from the test then you need to modify the script in some way. Is this where 'do' comes into use? This is why writing the tests *before* writing the code makes life so much

Re: TEST

2005-10-05 Thread Paul Johnson
On Tue, Oct 04, 2005 at 05:45:13AM -0400, Tom Allison wrote: > This isn't a test message sent to the list, that would be lame. ;) > > However it's all about Testing and how to do it the right way. > > I've been trying to use Test::More as the cornerstone of my testing. > This kind of falls into

Re: TEST

2005-10-05 Thread Peter Scott
On Tue, 04 Oct 2005 20:45:22 -0400, Tom Allison wrote: > Maybe my problem is more pandemic than that. > > I have some 200 scripts that I've written over the years and they kind > of all sit in ~/bin with all the modules in ~/lib > I was hoping to avoid 200 scripts and 200 modules. > > But it sou

Re: TEST

2005-10-04 Thread Tom Allison
Peter Scott wrote: On Tue, 04 Oct 2005 05:45:13 -0400, Tom Allison wrote: It seems that there really isn't any clear way to test a subroutine within a script and not a module. Besides loading it into a module and running everything from there -- any suggestions? I don't see it practical put

Re: TEST

2005-10-04 Thread Peter Scott
On Tue, 04 Oct 2005 05:45:13 -0400, Tom Allison wrote: > It seems that there really isn't any clear way to test a subroutine > within a script and not a module. Besides loading it into a module and > running everything from there -- any suggestions? I don't see it > practical putting a functio

Re: Test for integer

2005-10-03 Thread Robin
On Tuesday 04 October 2005 09:01, Zielfelder, Robert wrote: > How can I test the value of a variable to find out if it is an integer > or a string? Ultra simple way: if ($myVar =~ /^\d+$/) { print "$myVar is a number\n"; } else { print "$myVar contains things that aren't numbers\n"; } More detai

Re: test

2005-09-03 Thread Chris Devers
On Sat, 3 Sep 2005, Tony Frasketi wrote: > test F Please don't send test messages to mailing lists. Thank you. -- Chris Devers ¨ãkê%A„ôñt( -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: test

2005-08-19 Thread Chris Devers
On Fri, 19 Aug 2005, Tony Frasketi wrote: > test F Please don't send test messages to mailing lists. Thanks. -- Chris Devers -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Test.

2005-03-03 Thread JupiterHost.Net
Zeus Odin wrote: Do not read. To late :) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Test

2004-12-31 Thread Randy W. Sims
Sandy Santra wrote: Hi, this is just a test. I've been having a lot of problems posting to this list, as I keep getting the following message (even though I'm sending a text message): <[EMAIL PROTECTED]>: ezmlm-reject: fatal: Sorry, I don't accept messages of MIME Content-Type 'text/html' (#5.2.

Re: test

2004-12-31 Thread Felix Li
Beside "Testing merely proves the existence of bugs." Happy New Year! - Original Message - From: "Chris Devers" <[EMAIL PROTECTED]> To: "Sandy Santra" <[EMAIL PROTECTED]> Cc: Sent: Friday, December 31, 2004 1:09 PM Subject: Re: test

Re: test

2004-12-31 Thread Chris Devers
On Fri, 31 Dec 2004, Sandy Santra wrote: > This is another test in an attempt to post to the list. No response > necessary. We got your message the first time. No further tests necessary. -- Chris Devers -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

RE: Test For Dupplicate elements in an array

2004-04-20 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > I need to test if an array holds duplicates, and if so do something. If you just need to check for the presence of a duplicate, something like this will do the trick: sub has_dup { my %seen; $seen{$_}++ && return 1 for @_; } Of course, all the hash-based methods depe

Re: Test For Dupplicate elements in an array

2004-04-20 Thread Jeff 'japhy' Pinyan
On Apr 20, [EMAIL PROTECTED] said: >I need to test if an array holds duplicates, and if so do something. > >What is the slickest way of doing this ? The documentation offers a couple ways; the most common idiom uses a hash, as other people have shown. However, you can leave the hard work to Perl

RE: Test For Dupplicate elements in an array

2004-04-20 Thread Thomas Bätzler
<[EMAIL PROTECTED]> asked: > I need to test if an array holds duplicates, and if so do something. Try use strict; use warnings; my @array = qw(foo baz bar foo); my %have; foreach my $item (@array){ warn "duplicate item $item" if exists $have{$i

Re: test - please ignore

2004-04-04 Thread Oliver Fuchs
On Sun, 04 Apr 2004, Paul Johnson wrote: > But yes, test messages are not necessary. If you need to ask something, > just do so. If you need to test something, find an appropriate forum. > If you need to read something, just wait a few minutes. Yes, shame on me ... I hate test-messages too ...

Re: test - please ignore

2004-04-03 Thread Paul Johnson
On Sat, Apr 03, 2004 at 03:18:14PM -0800, Randal L. Schwartz wrote: > You failed the test. Now you must hang your head in shame. > At a bare minimum, you are now being ignored by everyone (including me) > who understands that what you just did was wrong and wasteful. > > And I say this publicly

Re: test - please ignore

2004-04-03 Thread Randal L. Schwartz
You failed the test. Now you must hang your head in shame. At a bare minimum, you are now being ignored by everyone (including me) who understands that what you just did was wrong and wasteful. And I say this publicly so that others viewing the archive of this group understand that this sort of

Re: Test::Harness weird failure

2004-03-26 Thread Paul Johnson
On Wed, Mar 24, 2004 at 09:41:32AM +0200, Claude wrote: > Actually, I got it wrong from the beginning: although there may be > ways go araound that, you _need_ the Test::More or Test::Simple from > the beginning. Test::Harness design is based on their use. I did not get > that right away. If nece

Re: Test::Harness weird failure

2004-03-24 Thread Claude
> "Claude" == Claude <[EMAIL PROTECTED]> writes: > "Paul" == Paul Johnson <[EMAIL PROTECTED]> writes: Paul> Claude said: >>> Hello, >>> >>> I tried to create a test suite file containing the following code: [...] Paul> use Test::More tests => 1; Claude> Why would I need this separated

Re: Test::Harness weird failure

2004-03-23 Thread Claude
> "Paul" == Paul Johnson <[EMAIL PROTECTED]> writes: Paul> Claude said: >> Hello, >> >> I tried to create a test suite file containing the following code: >> >> -- clip --- >> #! /usr/local/bin/perl >> >> use strict; >> use Test::Harness qw( &runtests $verbose ); >> $verbose=1; >> m

Re: Test::Harness weird failure

2004-03-17 Thread Paul Johnson
Claude said: > Hello, > > I tried to create a test suite file containing the following code: > > -- clip --- > #! /usr/local/bin/perl > > use strict; > use Test::Harness qw( &runtests $verbose ); > $verbose=1; > my @AoC = ( "t/00.pl" ); > my $len = @AoC; > print "1..$len\n"; This

RE: Test if browser's allows cookies/has them turned onetc..

2003-09-08 Thread Dan Muey
> > > > > > > > -Original Message- > > > > > From: Randal L. Schwartz [mailto:[EMAIL PROTECTED] > > > > > Sent: Thursday, September 04, 2003 12:33 PM > > > > > To: [EMAIL PROTECTED] > > > >

RE: Test if browser's allows cookies/has them turned onetc..

2003-09-08 Thread K Old
On Mon, 2003-09-08 at 16:11, Dan Muey wrote: > > > > Dan Muey wrote: > > > > > > -Original Message- > > > > From: Randal L. Schwartz [mailto:[EMAIL PROTECTED] > > > > Sent: Thursday, September 04, 2003 12:33 PM > > > > T

RE: Test if browser's allows cookies/has them turned onetc..

2003-09-08 Thread Dan Muey
> > Dan Muey wrote: > > > > -Original Message- > > > From: Randal L. Schwartz [mailto:[EMAIL PROTECTED] > > > Sent: Thursday, September 04, 2003 12:33 PM > > > To: [EMAIL PROTECTED] > > > Subject: Re: Test if

Re: Test if browser's allows cookies/has them turned onetc..

2003-09-08 Thread R. Joseph Newton
Dan Muey wrote: > > -Original Message- > > From: Randal L. Schwartz [mailto:[EMAIL PROTECTED] > > Sent: Thursday, September 04, 2003 12:33 PM > > To: [EMAIL PROTECTED] > > Subject: Re: Test if browser's allows cookies/has them turned onetc.. > >

RE: Test if browser's allows cookies/has them turned onetc..

2003-09-04 Thread Dan Muey
> -Original Message- > From: Randal L. Schwartz [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 04, 2003 12:33 PM > To: [EMAIL PROTECTED] > Subject: Re: Test if browser's allows cookies/has them turned onetc.. > > > >>>>> "Dan&

Re: Test if browser's allows cookies/has them turned onetc..

2003-09-04 Thread Randal L. Schwartz
> "Dan" == Dan Muey <[EMAIL PROTECTED]> writes: Dan> As much as I hate to do stuff that requires cookies, there is a Dan> project I'm doing that requires cookies. This should have been on [EMAIL PROTECTED] instead. More experts there about this stuff. Having said that, you should read my "b

RE: Test for empty list

2003-03-10 Thread Jeroen Lodewijks
Thanks all for the comments. Indeed I am interested in the empty list, not the print statement. I merely wanted to know if some sort special list operator existed. I am pretty sure that the code with 'last' is quicker than the ones with 'grep' but will do some tests on it. Cheers, Jeroen >===

last and grep - was: Re: Test for empty list

2003-03-09 Thread Katy Brownfield
On Sat, 08 Mar 2003 17:31:08 -0800, R. Joseph Newton <[EMAIL PROTECTED]> wrote: "Scott R. Godin" wrote: > #!/usr/bin/perl -w > > use strict; > > my @array = ('', 0, "", 1); > > my $hasTruth; > foreach (@array) { > if ($_ ){ > $hasTruth = "yezzindeedydo!"; > last; > } > } > if ($hasTr

  1   2   >