Help for this page

Select Code to Download


  1. or download this
    package Foo;
    use DBI;
    ...
    {
       # this sub requires database connectivity
    }
    
  2. or download this
    package Bar;
    use Foo;
    ...
       my $value = Foo::get_db_value();
       return $value * 42;
    }
    
  3. or download this
    use Bar;
    
    #something here to mock out Foo::get_db_value so that it returns a val
    +ue of "2"
    is(Bar::bar_func(), 84, "bar_func works as advertised");