App-rename
view release on metacpan or search on metacpan
bin/rename.PL view on Meta::CPAN
use Config;
use File::Basename qw(basename dirname);
chdir(dirname($0));
require '../lib/App/rename.pm';
($VERSION) = $App::rename::VERSION;
($file = basename($0)) =~ s/\.PL$//;
$file =~ s/\.pl$//
if ($Config{'osname'} eq 'VMS' or
$Config{'osname'} eq 'OS2'); # "case-forgiving"
open OUT,">$file" or die "Can't create $file: $!";
chmod(0755, $file);
print "Extracting $file\n";
$code = <<"!DO!SUBST!";
$Config{'startperl'} -CASL
#line 18
use strict;
use Getopt::Long;
use Text::Abbrev;
use File::Basename;
use File::Copy qw(copy);
use File::Glob ':bsd_glob';
my \$VERSION = '$VERSION';
!DO!SUBST!
$code .= <<'!NO!SUBST!';
#line 33
Getopt::Long::config(qw(bundling));
$Getopt::Long::prefix = '--';
my $ME = $0;
($ME = $0) =~ s!.*/!!;
$| = 1;
my $opt_dryrun = 0;
my $opt_backup = 0;
my $opt_command = undef;
my $opt_copy = 0;
my $opt_force = 0;
my $opt_interactive = 0;
my $opt_verbose = 0;
my $opt_help = 0;
my $opt_stdin = 1;
my $opt_version = 0;
my $opt_linkonly = 0;
my $opt_prefix = '';
my $opt_suffix = '';
my $opt_basename_prefix = '';
my $opt_vcm = $ENV{RENAME_VERSION_CONTROL}
|| $ENV{VERSION_CONTROL}
|| 'existing';
my $opt_shellcompletion;
sub VCM_OFF { -1 }
sub VCM_SIMPLE { 0 }
sub VCM_TEST { 1 }
sub VCM_NUMBERED { 2 }
my $vcm;
sub error {
my($ERROR) = @_;
print "$ME: $ERROR\n";
print "Try `$ME --help' for more information.\n";
exit 1;
( run in 1.391 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )