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

RFC: On renaming Tracing and Assertions

by simonflk (Pilgrim)
on Oct 27, 2004 at 15:23 UTC ( #403052=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        #!/usr/bin/perl -w
        use strict;
    ...
            rename $thing, $thing.".archive" or warn "Couldn't archive $th
    +ing: $!";
            TRACE("Tried to archive $thing");
        }
    
  2. or download this
        package MyModule;
    
    ...
        #Stubs for Tracing
        sub TRACE {}
        sub TRACE_HERE {}
    
  3. or download this
        use MyModule;
        use Tracing;
    ...
    
        MyModule::my_routine();
        MyModule::my_other_routine();
    
  4. or download this
        package MyModule;
        use Assertions 'die';
    ...
                # ...
            }
        }
    
  5. or download this
        use Assertions 'test';
        plan tests;
    ...
        ASSERT(EQUALS_FILE($returned, 'expected.txt'), 'munge_data is good
    + at munging');
    
        ASSERT(DIED(sub { $object_to_test->method(@bad_inputs) }));
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2023-02-07 17:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (40 votes). Check out past polls.

    Notices?