Sponsoring The Perl Toolchain Summit 2025: Help make this important event another success Learn more

File-Rename version 2.02
========================
This release is compatible with C<use v5.32>.
* use warnings
* avoid indirect syntax
* avoid bareword handles
RENAME COMMAND
File::Rename provides an implementation of Larry Wall's eg/rename
command. All I have done is add some error checking and
add the File/Rename.pm module. More options have been added.
An earlier version of the script is out in the Internet and is included
with some linuxes, and the original eg/rename is not included in the
Perl distribution, so I have put this up on CPAN.
A revised version of the earlier script is now on the Internet,
which includes more options. This script, distinguished by
"Getopt::Long::Configure('bundling')", was not written by me; I think
the author is Aristotle Pagaltzis. Version 0.10 of this distribution
has similar options to the revised script.
For Windows, the script is called file-rename to avoid clashes with
existing rename command.
RECENT CHANGES
1.30: unicode support
- added File::Rename::Unicode module
1.99: remove 'no_require_order'
The behaviour of requiring options to appear before
code or files was reintroduced - this requirement
was dropped in version 0.30.
The 'no_require_order' functionality is regarded as
unsafe but is available in the script unsafe-rename.
2.00: Build.PL was removed from distribution
2.01: minimum perl version is 5.8.0
- added source/rename source of rename script
2.02: perl-5.032 compatibility
- added C<use 5.032> to all source files
- source files are filtered to replace C<use 5.032;>
on older versions of perl.
INSTALLATION
To install this module type the following:
perl Makefile.PL
make
make test
make install
DEPENDENCIES
This module requires these other modules and libraries:
File::Basename File::Path File::Spec Getopt::Long
(all included with Perl).
Unicode support depends on Perl version 5.12.0.
Testing requires File::Temp and Test::More which
are available with perl 5.6.0. In the past,
I have successfully installed those modules
for perl 5.005_05 and tested this distribution.
Testing on earlier versions of Perl is now only done
on CPAN Testers. The minimum perl version for this
distribution is 5.8.0 - the earlist Perl version which
is known to work with recent versions of File::Rename
is 5.8.9.
UNICODE SUPPORT
File::Rename is built round CORE::rename(), which expects
filenames as octet strings. By default, File::Rename
expects all filenames to be octet strings, with no special
meanings for non-ascii octets.
It is possible for the user-supplied code to treat the
filenames as Perl strings consisting of unicode characters,
while CORE::readme() and other file tests still working on
octet strings. This is enabled with -u (--unicode).
It is possible to specify the encoding of filenames, with:
--unicode encoding. Filenames are decoded from octet
strings to unicode strings before applying the user code,
and then the resulting string is encoded for CORE::rename.
upgrade filenames to unicode (encoded as utf8) by default.
COPYRIGHT AND LICENCE
Copyright (C) 2005, 2006, 2007, 2011, 2018, 2020, 2021, 2022, 2023
by Robin Barker
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.4 or,
at your option, any later version of Perl 5 you may have available.