Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

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

Replies are listed 'Best First'.
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2018-06-25 05:13 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.