File::Transaction::Atomic

File::Transaction::Atomic offers atomic change to a group of files.
Download

File::Transaction::Atomic Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Nick Cleaton
  • Publisher web site:
  • http://search.cpan.org/~ncleaton/

File::Transaction::Atomic Tags


File::Transaction::Atomic Description

File::Transaction::Atomic offers atomic change to a group of files. File::Transaction::Atomic offers atomic change to a group of files.SYNOPSIS # # In this example, we wish to replace the word 'foo' with the # word 'bar' in several files, with no risk of ending up with # the replacement done in some files but not in others. # use File::Transaction::Atomic; my $ft = File::Transaction::Atomic->new; eval { foreach my $file (@list_of_file_names) { $ft->linewise_rewrite($file, sub { s#bfoob#bar#g; }); } }; if ($@) { $ft->revert; die "update aborted: $@"; } else { $ft->commit; Requirements: · Perl


File::Transaction::Atomic Related Software