Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

RFC: On renaming Tracing and Assertions

by simonflk (Pilgrim)
on Oct 27, 2004 at 15:23 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-19 21:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found