Module-Runtime

 view release on metacpan or  search on metacpan

t/rm.t  view on Meta::CPAN

    $^H{"Module::Runtime/test_a"} = 1;
    is $^H{"Module::Runtime/test_a"}, 1;
    is $^H{"Module::Runtime/test_b"}, undef;
    require_module("t::Hints");
    is $^H{"Module::Runtime/test_a"}, 1;
    is $^H{"Module::Runtime/test_b"}, undef;
    t::Hints->import;
    is $^H{"Module::Runtime/test_a"}, 1;
    is $^H{"Module::Runtime/test_b"}, 1;
    eval q{
        BEGIN { $^H |= 0x20000; $^H{foo} = 1; }
        BEGIN { is $^H{foo}, 1; }
        main::test_runtime_hint_hash("foo", 1);
        BEGIN { require_module("Math::BigInt"); }
        BEGIN { is $^H{foo}, 1; }
        main::test_runtime_hint_hash("foo", 1);
        1;
    }; die $@ unless $@ eq "";
}

# broken module is visibly broken when re-required

t/um.t  view on Meta::CPAN

    $^H{"Module::Runtime/test_a"} = 1;
    is $^H{"Module::Runtime/test_a"}, 1;
    is $^H{"Module::Runtime/test_b"}, undef;
    use_module("t::Hints");
    is $^H{"Module::Runtime/test_a"}, 1;
    is $^H{"Module::Runtime/test_b"}, undef;
    t::Hints->import;
    is $^H{"Module::Runtime/test_a"}, 1;
    is $^H{"Module::Runtime/test_b"}, 1;
    eval q{
        BEGIN { $^H |= 0x20000; $^H{foo} = 1; }
        BEGIN { is $^H{foo}, 1; }
        main::test_runtime_hint_hash("foo", 1);
        BEGIN { use_module("Math::BigInt"); }
        BEGIN { is $^H{foo}, 1; }
        main::test_runtime_hint_hash("foo", 1);
        1;
    }; die $@ unless $@ eq "";
}

# broken module is visibly broken when re-required

t/upo.t  view on Meta::CPAN

    $^H{"Module::Runtime/test_a"} = 1;
    is $^H{"Module::Runtime/test_a"}, 1;
    is $^H{"Module::Runtime/test_b"}, undef;
    use_package_optimistically("t::Hints");
    is $^H{"Module::Runtime/test_a"}, 1;
    is $^H{"Module::Runtime/test_b"}, undef;
    t::Hints->import;
    is $^H{"Module::Runtime/test_a"}, 1;
    is $^H{"Module::Runtime/test_b"}, 1;
    eval q{
        BEGIN { $^H |= 0x20000; $^H{foo} = 1; }
        BEGIN { is $^H{foo}, 1; }
        main::test_runtime_hint_hash("foo", 1);
        BEGIN { use_package_optimistically("Math::BigInt"); }
        BEGIN { is $^H{foo}, 1; }
        main::test_runtime_hint_hash("foo", 1);
        1;
    }; die $@ unless $@ eq "";
}

# broken module is visibly broken when re-required



( run in 0.943 second using v1.01-cache-2.11-cpan-49f99fa48dc )