Mercurial > pub > Impl
annotate Lib/IMPL/Config/Include.pm @ 259:b92f19630d33
Merge with 91bae9f41a9cf2d52f5cff5a5c3e7c8683c7d47e
author | sergey |
---|---|
date | Fri, 21 Dec 2012 00:09:11 +0400 |
parents | d63f9a92d6d4 |
children |
rev | line source |
---|---|
204
d63f9a92d6d4
+IMPL::Config::Include - simple way to include external config
sergey
parents:
diff
changeset
|
1 package IMPL::Config::Include; |
d63f9a92d6d4
+IMPL::Config::Include - simple way to include external config
sergey
parents:
diff
changeset
|
2 use strict; |
d63f9a92d6d4
+IMPL::Config::Include - simple way to include external config
sergey
parents:
diff
changeset
|
3 use warnings; |
d63f9a92d6d4
+IMPL::Config::Include - simple way to include external config
sergey
parents:
diff
changeset
|
4 use IMPL::require { |
d63f9a92d6d4
+IMPL::Config::Include - simple way to include external config
sergey
parents:
diff
changeset
|
5 Conf => 'IMPL::Config', |
d63f9a92d6d4
+IMPL::Config::Include - simple way to include external config
sergey
parents:
diff
changeset
|
6 Exception => 'IMPL::Exception' |
d63f9a92d6d4
+IMPL::Config::Include - simple way to include external config
sergey
parents:
diff
changeset
|
7 }; |
d63f9a92d6d4
+IMPL::Config::Include - simple way to include external config
sergey
parents:
diff
changeset
|
8 |
d63f9a92d6d4
+IMPL::Config::Include - simple way to include external config
sergey
parents:
diff
changeset
|
9 |
d63f9a92d6d4
+IMPL::Config::Include - simple way to include external config
sergey
parents:
diff
changeset
|
10 sub restore { |
d63f9a92d6d4
+IMPL::Config::Include - simple way to include external config
sergey
parents:
diff
changeset
|
11 my ($self,$data) = @_; |
d63f9a92d6d4
+IMPL::Config::Include - simple way to include external config
sergey
parents:
diff
changeset
|
12 |
d63f9a92d6d4
+IMPL::Config::Include - simple way to include external config
sergey
parents:
diff
changeset
|
13 die Exception->new("A file name is required") if ref $data || not $data; |
d63f9a92d6d4
+IMPL::Config::Include - simple way to include external config
sergey
parents:
diff
changeset
|
14 |
d63f9a92d6d4
+IMPL::Config::Include - simple way to include external config
sergey
parents:
diff
changeset
|
15 return Conf->spawn($data); |
d63f9a92d6d4
+IMPL::Config::Include - simple way to include external config
sergey
parents:
diff
changeset
|
16 } |
d63f9a92d6d4
+IMPL::Config::Include - simple way to include external config
sergey
parents:
diff
changeset
|
17 |
d63f9a92d6d4
+IMPL::Config::Include - simple way to include external config
sergey
parents:
diff
changeset
|
18 1; |