Mercurial > pub > Impl
comparison lib/IMPL/Config/YAMLConfig.pm @ 419:bbc4739c4d48 ref20150831
working on IMPL::Config::Container
| author | cin |
|---|---|
| date | Sun, 29 Jan 2017 10:30:20 +0300 |
| parents | 3f38dabaf5cc |
| children | 7798345304bc |
comparison
equal
deleted
inserted
replaced
| 418:3f38dabaf5cc | 419:bbc4739c4d48 |
|---|---|
| 1 package IMPL::Config::YAMLConfig; | 1 package IMPL::Config::YAMLConfig; |
| 2 use strict; | 2 use strict; |
| 3 | 3 |
| 4 use IMPL::lang qw(:base); | |
| 5 use IMPL::Exception(); | |
| 6 use YAML::XS(); | |
| 7 | |
| 8 sub Load { | |
| 9 my ( $this, $container, $file ) = @_; | |
| 10 | |
| 11 $this->Configure( isscalar($file) | |
| 12 ? YAML::XS::Load( ${$file} ) | |
| 13 : YAML::XS::LoadFile($file) ); | |
| 14 } | |
| 15 | |
| 4 sub Configure { | 16 sub Configure { |
| 5 my ($this, $container, $config) = @_; | 17 my ( $this, $container, $config ) = @_; |
| 6 | 18 |
| 19 | |
| 20 | |
| 7 } | 21 } |
| 8 | 22 |
| 9 1; | 23 1; |
| 10 | 24 |
| 11 __END__ | 25 __END__ |
