• Home
  • Most Popular
  • Submit
  • About Us
  • Contact Us

Softpile

Free Downloads

Categories
  • Home
  • Most Popular
  • Communications
  • Desktop
  • Games & Entertainment
  • Graphic Apps
  • Network & Internet
  • Security & Privacy
  • System Utilities
Alternative to itextsharp 2022.11.10347
IronPDF offers an itextsharp alternative for HTML to PDF conversion with C# code examples, documentation, and ...
VShell Server for Linux and Mac 4.8
VShell is a versatile and secure file transfer server that supports multiple protocols and is compatible ...
PDF Studio PDF Editor for Linux 2022
PDF Studio is a cost-effective PDF editor that delivers full compatibility with the PDF Standard. It's ...
VQ Probe for Linux 1.5
VQ Probe is a comprehensive software tool that enables objective and subjective video quality analysis. The ...
Resilient Server 2.3
This Debian GNU/Linux (Buster) based software has a customized partitioning scheme that enhances robustness against filesystem ...
Valentina Studio for Linux 9.6
Valentina Studio is a cross-platform GUI manager for Mac, Windows, and Linux. It allows users to ...
VPN Lifeguard for Linux 1.0.58
The software monitors VPN connection and automatically terminates apps during connection loss, re-establishes the connection and ...
G_Viewer 0.84
G_Viewer is a Linux software that serves as both a file system and photo/image viewer. It ...
Checksome File Hash Tool for Linux 1.1
This software allows for the generation and verification of file hashes. It is a quick and ...
KeyWrangler Password Manager for Linux 1.2
A password management software that is secure, offline and extensible. It offers military-grade encryption to protect ...
Home Linux File::Transaction Download

File::Transaction

September 8, 2009
A software that enables transactional change to a group of files.
Version 1.00
License Perl Artistic License
Platform Linux
Supported Languages English
Homepage search.cpan.org
Developed by Nick Cleaton
The File::Transaction object is a powerful tool that encapsulates a change to a set of files. This kind of change is performed by writing out a new version of each file first and then swapping all the new versions in. Thanks to this, you can be sure that the files are always consistent. However, keep in mind that the set of files can only end up in an inconsistent state if a rename system call fails or if the Perl process is interrupted during the commit().

If you need to add files to the transaction, it's critical to consider the order that you do it. Files will be committed in the order they're added to the transaction. Therefore, the order in which you add them should be chosen with care to limit the damage to your data if the commit() fails part way through. In case there's no order that renders a partial commit acceptable, consider using File::Transaction::Atomic instead.

To demonstrate how to use this module, consider the following example where we want to replace the word 'foo' with 'bar' in several files. We want to minimize the risk of ending up with the replacement done in some files but not others. We achieve this by using the linewise_rewrite method as follows:

use File::Transaction;
my $ft = File::Transaction->new;
eval {
foreach my $file (@list_of_file_names) {
$ft->linewise_rewrite($file, sub {
s#foo#bar#g;
});
}
};
if ($@) {
$ft->revert;
die "update aborted: $@";
} else {
$ft->commit;
}

In summary, File::Transaction provides an excellent way to perform changes to sets of files while keeping them consistent. Keep in mind the order in which the files are added to the transaction and consider using File::Transaction::Atomic if a partial commit isn't acceptable. Overall, we recommend this module for any project that involves making filesystem modifications.
What's New

Version 1.00: N/A

Free Download 3.7K
323
  • Share on:

Most Popular

  1. Quicksilver Forums 1.4.2
    154
  2. Dvgrab 3.4
    102
  3. DynVPN 1.0
    89
  4. CherryTV 0.1
    81
  5. SlideMap 1.2.2
    80
  6. porm r2
    73
  7. Clewarecontrol 0.8
    72
  8. Java Games 1.0
    72
  9. Swiftfox 3.0b5pre-2
    71
  10. fuseftp 0.8
    71

Related Downloads

miau
Miau is a comprehensive IRC bouncer and proxy with a small footprint. ...
Cabber
Cabber is a console-based Jabber client designed to serve console users with ...
minicom
Minicom is a utility software designed for serial communication.
Chanta Claus
Chanta Claus is an arcade game designed for kids that revolves around ...
SingIt Lyric Displayer
SingIt Lyric Displayer is an XMMS plugin that exhibits formatted lyrics with ...
ChibiTracker
ChibiTracker is an IT clone that is portable, making it easily transferable ...
envelope
Envelope is a software designed for the Laserjet 5L printer and utilizes ...
Portable Linux Processor Affinity
Portable Linux Processor Affinity is a Linux-based software that addresses the issue ...
DBLog
DBLog is a logging software designed for radio enthusiasts, working on a ...
iptables Netflow module
ipt_NETFLOW is a module for the Linux 2.6 kernel that allows for ...
Copyright © 1999-2025 Softpile Free Downloads
  • Most Popular
  • Submit
  • About Us
  • Contact Us
  • Privacy Policy
  • Disclaimer
  • Terms of Use

Can we use your data to tailor ads for you?

Our partners will collect data and use cookies for ad personalization and measurement.

By choosing "I agree", closing this pop-up or clicking on any element on the page, you agree to the use of cookies to help us provide you with a better user experience.

Learn how Softpile and our partners collect and use data.

You can change your choice at any time in our privacy center.

Cookie Settings

Our website stores four types of cookies. At any time you can choose which cookies you accept and which you refuse. You can read more about what cookies are and what types of cookies we store in our Cookie Policy.

are necessary for technical reasons. Without them, this website may not function properly.

are necessary for specific functionality on the website. Without them, some features may be disabled.

allow us to analyse website use and to improve the visitor's experience.

allow us to personalise your experience and to send you relevant content and offers, on this website and other websites.