From: Rob H. <for...@us...> - 2001-12-20 02:58:05
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv14791 Modified Files: File.pm Log Message: internal stuff. _do_file_read needs to treat <FILE> as array, not scalar. Index: File.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/File.pm,v retrieving revision 1.20 retrieving revision 1.21 diff -U2 -r1.20 -r1.21 --- File.pm 2001/12/20 02:51:13 1.20 +++ File.pm 2001/12/20 02:58:02 1.21 @@ -96,9 +96,10 @@ sub create_file { my $self = shift; + my %args = @_; my $location = $self->{'location'}; my $filename = $self->{'filename'}; - my $log = $self->{'log_obj'}; + my $contents = $args{'contents'}; - my $return = _do_file_write( 'contents' => "test" ); + my $return = _do_file_write( 'contents' => "$contents" ); return $return; @@ -175,5 +176,4 @@ my $location = $self->{'location'}; my $filename = $self->{'filename'}; - my $log = $self->{'log_obj'}; my $contents = _do_file_read( @@ -182,4 +182,6 @@ ); + + return $contents; } @@ -223,4 +225,5 @@ print FILE $contents; my $return = close FILE; + return $return; } @@ -231,7 +234,9 @@ my $filename = $args{'filename'}; - open (FILE, "<$location/$filename"); - my $contents = <FILE>; - return $contents; + open (FILE, "< $location/$filename"); + my @contents = <FILE>; + close FILE; + + return "@contents"; } |