Acme-Incorporated
view release on metacpan or search on metacpan
'... a reference to fine_products()' );
{
my $non_random = \&Acme::Incorporated::empty_box;
my $breakage;
local (*Acme::Incorporated::bad_product, *Acme::Incorporated::breaks, %INC);
*Acme::Incorporated::bad_product = sub { $non_random };
*Acme::Incorporated::breaks = sub { $breakage-- };
eval { require 'Some::Module'; 1 };
is( $@, '',
'loading a module should apparently succeed if empty box chosen' );
ok( $INC{'Some/Module.pm'}, '... populating %INC appropriately' );
ok( Some::Module::some_sub(), '... installing always successful subs' );
local @INC = ( 'lib', $INC[0] );
$non_random = \&Acme::Incorporated::breaks_when_needed;
$breakage = 5;
eval { require 'BreakMe' };
is( $@, '',
'loading a module should succeed if breakable chosen' );
ok( $moving_on, '... breaking infinite loops' );
( run in 1.597 second using v1.01-cache-2.11-cpan-4d50c553e7e )