7 BEGIN { @*INC.unshift('t/packages'); }
10 ok(Pugs::Internals::current_pragma_value('pragma::Demo').notdef, "Scope is lexical, not dynamic");
14 use pragma::Demo 'x1';
15 is(Pugs::Internals::current_pragma_value('pragma::Demo'), '1', "Outer value is set", :todo<feature>);
17 is(Pugs::Internals::current_pragma_value('pragma::Demo'), '1', "Outer value is inherited", :todo<feature>);
18 use pragma::Demo 'x2';
19 is(Pugs::Internals::current_pragma_value('pragma::Demo'), '2', "Inner value is set", :todo<feature>);
22 is(Pugs::Internals::current_pragma_value('pragma::Demo'), '1', "Outer value is restored", :todo<feature>);
23 use pragma::Demo 'x3';
24 is(Pugs::Internals::current_pragma_value('pragma::Demo'), '3', "Outer value is overidden", :todo<feature>);
28 is(Pugs::Internals::current_pragma_value('pragma::Demo'), '3', "Outer value is inherited", :todo<feature>);
30 is(Pugs::Internals::current_pragma_value('pragma::Demo'), '3', "Outer value is inherited", :todo<feature>);
31 use pragma::Demo 'x4';
32 is(Pugs::Internals::current_pragma_value('pragma::Demo'), '4', "Inner value is overridden", :todo<feature>);
35 is(Pugs::Internals::current_pragma_value('pragma::Demo'), '3', "Inner value is restored", :todo<feature>);
36 use pragma::Demo 'x5';
37 is(Pugs::Internals::current_pragma_value('pragma::Demo'), '5', "Inner value is overridden", :todo<feature>);
40 is(Pugs::Internals::current_pragma_value('pragma::Demo'), '3', "Outer value is restored", :todo<feature>);
41 ok(Pugs::Internals::current_pragma_value('SNONK').notdef, "Absent pragma is not defined");
46 use pragma::Demo 'x6';
50 use pragma::Demo 'x7';
55 use pragma::Demo 'x8';
60 sub check_cpv ($expected) {
61 is(Pugs::Internals::caller_pragma_value('pragma::Demo'), $expected,
62 "Caller pragma value $expected", :todo<feature>);