Lines Matching +full:package +full:- +full:mode
19 my $c = Safe->new or die;
22 $c->reval('$P = "safe root"');
28 my $t = Text::Template->new(
30 SOURCE => 'package is {$P}') or die;
32 # (1) Default behavior: Inherit from calling package, `main' in this case.
33 my $text = $t->fill_in();
34 is $text, 'package is main';
36 # (2) When a package is specified, we should use that package instead.
37 $text = $t->fill_in(PACKAGE => 'Q');
38 is $text, 'package is Q';
40 # (3) When no package is specified in safe mode, we should use the
42 $text = $t->fill_in(SAFE => $c);
43 is $text, 'package is safe root';
45 # (4) When a package is specified in safe mode, we should use the
46 # default safe root, after aliasing to the specified package
49 $text = $t->fill_in(SAFE => $c, PACKAGE => 'Q');
50 is $text, 'package is Q';
54 $t = Text::Template->new(
58 # (5) First in default mode
59 $text = $t->fill_in(HASH => { H => 'good5' });
66 $text = $t->fill_in(HASH => { H => 'good6' }, PACKAGE => 'Q');
72 $text = $t->fill_in(HASH => { H => 'good7' }, SAFE => $c);
76 # (8) Now in the default root after aliasing to a package that
81 $text = $t->fill_in(HASH => { H => 'good8' }, SAFE => $c, PACKAGE => 'Q2');
86 # (9) This var should NOT have been installed into the main package