/[gentoo-perl]/g-cpan/trunk/lib/Gentoo/Config.pm
Gentoo

Diff of /g-cpan/trunk/lib/Gentoo/Config.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 84 Revision 85
137sub getValue { 137sub getValue {
138 my $self = shift; 138 my $self = shift;
139 my $confVal = shift; 139 my $confVal = shift;
140 my $makeconf = getParamFromFile( getFileContents("/etc/make.conf"), 140 my $makeconf = getParamFromFile( getFileContents("/etc/make.conf"),
141 "$confVal", "lastseen" ); 141 "$confVal", "lastseen" );
142 if ( !$makeconf ) { 142 my $filedata =
143 $makeconf = getParamFromFile( getFileContents("/etc/make.globals"), 143 getFileContents("/etc/make.globals").getFileContents("/etc/make.conf");
144 "$confVal", "lastseen" ); 144 my $param = getParamFromFile($filedata,$confVal,"lastseen");
145
146 while ($param =~m/\$\{(.+)\}/)
147 {
148 my $fetchparam=getParamFromFile($filedata,$1,"lastseen");
149 $param=~s/\$\{$1\}/$fetchparam/;
145 } 150 }
146 151
147 if ( !$makeconf ) { 152 if ( !$param ) {
148 return undef; 153 return undef;
149 } 154 }
150 $self->{ lc($confVal) } = $makeconf; 155 $self->{ lc($confVal) } = $param;
151} 156}
152 157
153sub DESTROY { 158sub DESTROY {
154 my ($self) = @_; 159 my ($self) = @_;
155 return if $self->{DESTROY}{__PACKAGE__}++; 160 return if $self->{DESTROY}{__PACKAGE__}++;

Legend:
Removed from v.84  
changed lines
  Added in v.85

  ViewVC Help
Powered by ViewVC 1.1.20