Mercurial > pub > Impl
view _test/temp.pl @ 422:b0481c071bea ref20150831
IMPL::Config::Container tests, YAMLConfiguration now works and tested
author | cin |
---|---|
date | Sun, 20 Aug 2017 00:20:41 +0300 |
parents | bbc4739c4d48 |
children | 60c2892a577c |
line wrap: on
line source
#!/usr/bin/perl use strict; use Carp; use Time::HiRes qw(gettimeofday tv_interval); use Scalar::Util qw(blessed refaddr); use YAML::XS qw(Dump Load); use Data::Dumper; use URI; use IMPL::require { Container => 'IMPL::Config::Container', Service => 'IMPL::Config::ServiceDescriptor', Reference => 'IMPL::Config::ReferenceDescriptor', Value => 'IMPL::Config::ValueDescriptor', YAMLConfig => 'IMPL::Config::YAMLConfig' }; my $t = [gettimeofday]; my $config = YAMLConfig->new(load => 'sample.yaml'); print "Loaded: ",tv_interval($t,[gettimeofday]),"\n"; my $container = Container->new()->AutoPtr; $config->ConfigureContainer($container); print "Configured: ",tv_interval($t,[gettimeofday]),"\n"; #print Data::Dumper->Dump([$container]); #$container->Dispose(); my $base = URI->new('some/path'); my $rel = URI->new('../other/path')->abs($base)->rel('/'); print $rel,"\n"; 1;