Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

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?

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2014-07-12 12:15 GMT
Find Nodes?
    Voting Booth?

    When choosing user names for websites, I prefer to use:

    Results (239 votes), past polls