my %Opt = (
);
get_options(\%Opt);
-#help() unless @ARGV;
$main::_DATA_ = undef;
$Opt{find} = 1 if $Opt{'find-only'};
$Opt{extension} =~ s/^\.// if $Opt{extension};
use File::Find;
no warnings 'File::Find';
-@ARGV = grep {&file_readable($_)} @ARGV if @ARGV;
+@ARGV = grep {file_readable($_)} @ARGV if @ARGV;
if (!@ARGV and !-t STDIN) {
die "$NAME: option `find` does not work with STDIN!\n" if $Opt{find};
@ARGV = "-";
verbose(1,"Processing $file");
- my @lines = &shell_replace($hfile);
+ my @lines = shell_replace($hfile);
close $hfile;
if ( join('',@original) ne join('',@lines) ) {
verbose(1,"Change detected in $file");
verbose(2,'Lines: '.@lines.'/'.@original);
- #&shell_replace_write($file,@lines) if !$is_stdin and !$DEBUG;
+ #shell_replace_write($file,@lines) if !$is_stdin and !$DEBUG;
# Write changes
if (!$is_stdin and !$DEBUG) {
}
return 1;
}
+
sub wanted {
my $file = $File::Find::name;
- &file_readable($file) or return;
+ file_readable($file) or return;
#warn "$file ".(-r $file ? "YES" : "NO");
# Dont want the myself
- return if &myself($file);
+ return if myself($file);
my $hfile;
open($hfile,"<","$file");
$cmd = $2;
push @lines, $line;
#die $cmd;
- push @lines, map{s/^/$blank/;$_} &cmd($cmd);
+ push @lines, map{s/^/$blank/;$_} cmd($cmd);
} elsif ($line =~ /^\s*.{1,3}<SHELL_REPLACE/) {
$i = 0;
$blank = $1;
$cmd = $2;
push @lines, $line;
- push @lines, map{ s/^/$blank/; $_ } &cmd($cmd);
+ push @lines, map{ s/^/$blank/; $_ } cmd($cmd);
$line = <$hfile>;
} else {