Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Test::Exception extension with (evil?) overloading

by adrianh (Chancellor)
on Jan 18, 2003 at 00:56 UTC ( #227879=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    use Test::More 'no_plan';
    use Test::Exception;
  2. or download this
    my $result;
    lives_ok {$result = $o->answer} 'answer worked';
    is $result, 42, 'answer returned 42';
  3. or download this
    is live{$o->answer}, 42, 'answer worked';
  4. or download this
           Returns the result of the given expression if no
               unlike live {$o->foo}, '/fribble/', 'no fribble';
           Appropriate care must be taken.
  5. or download this
    use Sub::Uplevel;
        ) if $@;

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://227879]
Approved by jeffa
[stevieb]: it's a long day when you want to make changes to a project and the entire test suite takes 2 hours to fully run :)

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2017-03-26 22:00 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (315 votes). Check out past polls.