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 {
|
419
|
19 open my $h, "<", "sample.yaml" or die;
|
|
20 print "H: ", *{$h}{IO}, "\n";
|
418
|
21 binmode $h;
|
|
22 local $/;
|
|
23 $data = <$h>;
|
|
24 }
|
417
|
25
|
418
|
26 my $t = [gettimeofday];
|
417
|
27
|
418
|
28 print Dump Load($data);
|
417
|
29
|
|
30 print "Activated: ",tv_interval($t,[gettimeofday]),"\n";
|
|
31
|
|
32
|
407
|
33 1;
|