Lines 1-22
Link Here
|
1 |
use Modern::Perl; |
1 |
use Modern::Perl; |
2 |
use Test::More; |
2 |
use Test::More; |
3 |
|
3 |
|
4 |
use YAML::Syck; |
4 |
use YAML::XS; |
5 |
use Template; |
5 |
use Template; |
6 |
use utf8; |
6 |
use utf8; |
7 |
|
7 |
|
8 |
$YAML::Syck::ImplicitTyping = 1; |
|
|
9 |
$YAML::Syck::ImplicitUnicode = 1; |
10 |
|
11 |
my $template = Template->new( ENCODING => 'UTF-8' ); |
8 |
my $template = Template->new( ENCODING => 'UTF-8' ); |
12 |
|
9 |
|
13 |
my $vars; |
10 |
my $vars; |
14 |
my $output; |
11 |
my $output; |
15 |
$template->process( 't/db_dependent/data/syspref.pref', $vars, \$output ); |
12 |
$template->process( 't/db_dependent/data/syspref.pref', $vars, \$output ); |
16 |
|
13 |
|
17 |
use Data::Printer colored => 1; warn p $output; |
14 |
my $yaml = YAML::XS::Load( $output ); |
18 |
|
|
|
19 |
my $yaml = YAML::Syck::Load( $output ); |
20 |
my $syspref_1 = $yaml->{Test}->{Testing}->[0]; |
15 |
my $syspref_1 = $yaml->{Test}->{Testing}->[0]; |
21 |
my $syspref_2 = $yaml->{Test}->{Testing}->[1]; |
16 |
my $syspref_2 = $yaml->{Test}->{Testing}->[1]; |
22 |
my $syspref_3 = $yaml->{Test}->{Testing}->[2]; |
17 |
my $syspref_3 = $yaml->{Test}->{Testing}->[2]; |
23 |
- |
|
|