Rex::Hook::File::Impostor - execute Rex file management commands on a copy of the original file
version v0.1.0.1
use Rex::Hook::File::Impostor;
This module lets Rex execute file management commands on a copy of the file instead of the original one.
This could be particularly useful when it is loaded conditionally to be combined with other modules. For example together with Rex::Hook::File::Diff, it could be used to show a diff of file changes without actually changing the original file contents.
It works by installing a before hook for file commands, which makes a copy of the original file into a temporary directory, and then overrides the original arguments of the file commands.
This module does not do any error checking (yet).
It uses the same temporary directory that is used by Rex. Therefore it can be configured with set_tmp_dir:
Rex::Config->set_tmp_dir($tmp_dir);
This module does not use any environment variables.
See the included cpanfile.
cpanfile
There are no known incompatibilities with other modules.
There are no known bugs. Make sure they are reported.
Ferenc Erki <erkiferenc@gmail.com>
This software is Copyright (c) 2020 by Ferenc Erki.
This is free software, licensed under:
The GNU Lesser General Public License, Version 3, June 2007
Early versions of this software were sponsorware. Thanks to GitHub sponsors, it is now available to everyone!
To install Rex::Hook::File::Impostor, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Rex::Hook::File::Impostor
CPAN shell
perl -MCPAN -e shell install Rex::Hook::File::Impostor
For more information on module installation, please visit the detailed CPAN module installation guide.