comparison Lib/IMPL/Config.pm @ 170:b88b7fe60aa3

refactoring
author sourcer
date Tue, 24 May 2011 01:11:16 +0400
parents 76515373dac0
children b3d91ff7aea9
comparison
equal deleted inserted replaced
169:fd92830036c3 170:b88b7fe60aa3
4 4
5 use parent qw(IMPL::Object::Accessor IMPL::Object::Serializable IMPL::Object::Autofill); 5 use parent qw(IMPL::Object::Accessor IMPL::Object::Serializable IMPL::Object::Autofill);
6 6
7 __PACKAGE__->PassThroughArgs; 7 __PACKAGE__->PassThroughArgs;
8 8
9 use File::Spec();
10
9 use IMPL::Class::Member; 11 use IMPL::Class::Member;
10 use IMPL::Class::PropertyInfo; 12 use IMPL::Class::PropertyInfo;
11 use IMPL::Exception; 13 use IMPL::Exception;
12 14
13 use IMPL::Serialization; 15 use IMPL::Serialization;
14 use IMPL::Serialization::XmlFormatter; 16 use IMPL::Serialization::XmlFormatter;
15 17
16 18 our $ConfigBase ||= '';
17 19
18 sub LoadXMLFile { 20 sub LoadXMLFile {
19 my ($self,$file) = @_; 21 my ($self,$file) = @_;
20 22
21 my $class = ref $self || $self; 23 my $class = ref $self || $self;
87 }, 89 },
88 1); 90 1);
89 } 91 }
90 92
91 sub spawn { 93 sub spawn {
92 goto &LoadXMLFile; 94 my ($this,$file) = @_;
95 return $this->LoadXMLFile( File::Spec->catfile($ConfigBase,$file) );
93 } 96 }
94 97
95 sub get { 98 sub get {
96 my $this = shift; 99 my $this = shift;
97 100