ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/Cache/CacheUtilities.pm
(Generate patch)

Comparing COMP/SCRAM/src/Cache/CacheUtilities.pm (file contents):
Revision 1.5 by sashby, Thu Aug 18 15:03:44 2005 UTC vs.
Revision 1.7 by sashby, Mon Sep 11 13:48:33 2006 UTC

# Line 71 | Line 71 | sub read()
71     return $cache;
72     }
73  
74 < =item   C<write($cacheobject,$cachefilenam)>
74 > =item   C<write($cacheobject,$cachefilename)>
75  
76   Dump the Perl object $cacheobject to a file $cachefilename.
77  
# Line 80 | Line 80 | Dump the Perl object $cacheobject to a f
80   sub write()
81     {
82     my ($cacheobject,$cachefilename) = @_;
83 <
83 >  
84     use Data::Dumper;
85     use File::Copy;
86  
87 <   print "[ CacheUtilities::write() ] Writing cache ",$cachefilename,"\n", if ($ENV{SCRAM_DEBUG});  
87 >   print "[ CacheUtilities::write() ] Writing cache ",$cachefilename,"\n", if ($ENV{SCRAM_DEBUG});
88    
89 <   # Rename the cache file to make a backup copy:
89 >   # Move the cache file to make a backup:
90     move($cachefilename,$cachefilename.".bak") if ( -r $cachefilename);  
91     # Dump the cache to file:
92     my $cachefh = IO::File->new($cachefilename, O_WRONLY|O_CREAT)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines