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) }));