Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Problem using Test::Simple

by integral (Hermit)
on Jul 22, 2004 at 10:52 UTC ( #376531=note: print w/ replies, xml ) Need Help??


in reply to Problem using Test::Simple

The first warning is because on the third line of the main bit of code you've used $a, but that's the only place you've used it. You can find out more about perl's warnings by checking in perldiag or using the diagnostics pragma.

The problem with the benchmarking part of the code looks like two things: a) you're using 'stdin' and not 'STDIN'; b) you're only looping once. The first is because the four builtin filehandles (STDIN, STDOUT, STDERR, and DATA) are all in uppercase not lowercase, so your code perhaps should be $b = <STDIN>. The warning is produced by Test::Benchmark because you've only specified one iteration to is_faster which means the code executes faster than the resolution of the system clock.

--
integral, resident of freenode's #perl


Comment on Re: Problem using Test::Simple
Select or Download Code
Re^2: Problem using Test::Simple
by ambrus (Abbot) on Jul 22, 2004 at 13:12 UTC

    stderr is an obsolate alias for STDERR. It should work, but give a warning.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://376531]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2014-07-25 03:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (167 votes), past polls