sub Foo::new { require MockFoo; return MockFoo->new(); } # blah blah blah - tests in here eval `cat Foo.pm`; # borrowed from 'Programming Perl' # to reestablish the original meaning