--- loncom/ConfigFileEdit.pm 2003/12/02 12:06:25 1.2 +++ loncom/ConfigFileEdit.pm 2003/12/30 11:28:51 1.3 @@ -313,6 +313,24 @@ sub Write { } } +# Get: +# return the entire contents of the file as a string. +# Parameters: +# $self - (this). +# +sub Get { + my $self = shift; + + my $contents = ""; + my $lines = $self->{LineArray}; + my $length = @$lines; + + for (my $i = 0; $i < $length; $i++) { + $contents .= $lines->[$i]."\n"; + } + return $contents; +} + 1; #----------------------------- Documentation -------------------------------------- # @@ -427,6 +445,10 @@ Writes the contents of the configuration =back +=head2 Get () + +Return the entire contents of the configuration file as a single string. + =head2 Comment ( line ) Static member that returns true if the line passed in is a comment or blank line. @@ -443,6 +465,8 @@ Static member that returns the value of =back + + =head2 Index ( linearray, fieldno ) Returns a reference to a hash that indexes a line array by a particular field number.