Lines Matching +full:diag +full:- +full:version
11 my $tmpfile = File::Temp->new;
18 We will put value of \$v (which is "abc") here -> {\$v}
19 We will evaluate 1+1 here -> {1 + 1}
24 my $TEMPFILE = $tmpfile->filename;
40 my $template = Text::Template->new('type' => 'FILE', 'source' => $TEMPFILE);
41 ok(defined $template) or diag $Text::Template::ERROR;
46 We will put value of \$v (which is "abc") here -> abc
47 We will evaluate 1+1 here -> 2
51 We will put value of \$v (which is "abc") here -> ABC
52 We will evaluate 1+1 here -> 2
55 my $text = $template->fill_in('package' => 'X');
59 $text = $template->fill_in('package' => 'Y');
63 $text = Text::Template->fill_this_in($template_1, 'package' => 'X');
69 $template = Text::Template->new(type => 'FILEHANDLE', source => $tmpl);
70 ok defined $template or diag $Text::Template::ERROR;
73 $text = $template->fill_in('package' => 'X');
77 $text = $template->fill_in('package' => 'Y');
83 $template = Text::Template->new(
86 'We will put value of $v (which is "abc") here -> {$v}', "\n",
87 'We will evaluate 1+1 here -> {1+1}', "\n"
91 ok defined $template; # or diag $Text::Template::ERROR;
94 $text = $template->fill_in('package' => 'X');
98 $text = $template->fill_in('package' => 'Y');
102 # Test added for version 1.11
103 $tmpl = Text::Template->new(TYPE => 'STRING', SOURCE => 'B{"\\}"}C{"\\{"}D');
106 $text = $tmpl->fill_in();
110 # Test added for version 1.11
111 $tmpl = Text::Template->new(TYPE => 'STRING', SOURCE => qq{A{"\t"}B});
116 $text = $tmpl->fill_in();
120 # (14-27) Make sure \ is working properly
121 # Test added for version 1.11
141 my $tmpl = Text::Template->new(TYPE => 'STRING', SOURCE => $test);
142 my $text = $tmpl->fill_in;
145 or diag "expected .$result. got .$text.";
148 # (28-30) I discovered that you can't pass a glob ref as your filehandle.
152 ok(open $tmpl, '<', $TEMPFILE) or diag "Couldn't open $TEMPFILE: $!";
153 $template = Text::Template->new(type => 'FILEHANDLE', source => $tmpl);
154 ok(defined $template) or diag $Text::Template::ERROR;
157 $text = $template->fill_in('package' => 'X');
161 $text = $template->fill_in('package' => 'Y');
174 $text = Text::Template->new(
177 )->fill_in(FILENAME => 'foo.txt');