From: Chris W. <la...@us...> - 2005-02-26 23:24:59
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv858/OpenInteract2/Config Modified Files: Ini.pm Log Message: initialize metadata so we don't get any surprises if people don't assign data to the INI object properly (using hash access vs set()) Index: Ini.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Config/Ini.pm,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Ini.pm 27 Nov 2004 20:33:55 -0000 1.18 --- Ini.pm 26 Feb 2005 23:24:35 -0000 1.19 *************** *** 19,31 **** # Stuff in metadata (_m): ! # sections (\@): all full sections, in the order they were read ! # comments (\%): key is full section name, value is comment scalar ! # filename ($): file read from ! # directory ($): directory file read from sub new { my ( $pkg, $params ) = @_; my $class = ref $pkg || $pkg; ! my $self = bless( {}, $class ); if ( $self->{_m}{filename} = $params->{filename} ) { $self->{_m}{directory} = $params->{directory} || dirname( $params->{filename} ); --- 19,39 ---- # Stuff in metadata (_m): ! # sections (\@): all full sections, in the order they were read ! # comments (\%): key is full section name, value is comment scalar ! # filename ($): file read from ! # directory ($): directory file read from ! # order (\@): order of sections read/assigned ! # order_map (\%): to determine if section exists sub new { my ( $pkg, $params ) = @_; my $class = ref $pkg || $pkg; ! my $self = bless( { ! filename => '', ! directory => '', ! sections => [], ! comments => {}, ! order => [], ! }, $class ); if ( $self->{_m}{filename} = $params->{filename} ) { $self->{_m}{directory} = $params->{directory} || dirname( $params->{filename} ); |