Help for this page

Select Code to Download


  1. or download this
    package Foo; 
    use Bar;
    1;
    
  2. or download this
    package Bar; 
    0;
    
  3. or download this
    use Test::More tests => 2;
    
    ...
        eval "require Foo";
        ok( $@, "Saw error loading Foo" );
    }
    
  4. or download this
    1..2
    ok 1 - Saw error loading Foo
    ...
    #   Failed test 'Saw error loading Foo'
    #   at check_foo.pl line 5.
    # Looks like you failed 1 test of 2.
    
  5. or download this
    my %have_module;
    sub have_module {
    ...
        }
        return $have_module{$mod};
    }