Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Test::Exception extension with (evil?) overloading

by adrianh (Chancellor)
on Jan 18, 2003 at 00:56 UTC ( [id://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
    live
           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 $@;
        $value;
    };
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://227879]
Approved by jeffa
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (1)
As of 2024-04-24 14:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found