210
|
1 #!/usr/bin/perl
|
|
2 use strict;
|
412
|
3 use Carp;
|
|
4 use Time::HiRes qw(gettimeofday tv_interval);
|
415
|
5 use Scalar::Util qw(blessed refaddr);
|
418
|
6 use YAML::XS qw(Dump Load);
|
407
|
7
|
418
|
8
|
417
|
9
|
|
10 use IMPL::require {
|
|
11 Container => 'IMPL::Config::Container',
|
|
12 Service => 'IMPL::Config::ServiceDescriptor',
|
|
13 Reference => 'IMPL::Config::ReferenceDescriptor',
|
|
14 Value => 'IMPL::Config::ValueDescriptor'
|
|
15 };
|
|
16
|
418
|
17 my $data;
|
|
18 {
|
|
19 open my $h, "sample.yaml" or die;
|
|
20 binmode $h;
|
|
21 local $/;
|
|
22 $data = <$h>;
|
|
23 }
|
417
|
24
|
418
|
25 my $t = [gettimeofday];
|
417
|
26
|
418
|
27 print Dump Load($data);
|
417
|
28
|
|
29 print "Activated: ",tv_interval($t,[gettimeofday]),"\n";
|
|
30
|
|
31
|
407
|
32 1;
|