summaryrefslogtreecommitdiff
path: root/x2p/find2perl.PL
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-02-28 00:00:05 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-02-28 00:00:05 +0000
commitc7b9dd210bc8835ea8e4750a4d97a670da01ea70 (patch)
tree53ec41c4344ab6f250ffc75812ff6029ee19b5d5 /x2p/find2perl.PL
parent33e06c89116da420821234eb364a70b215b00a8d (diff)
downloadperl-c7b9dd210bc8835ea8e4750a4d97a670da01ea70.tar.gz
m/.*$/ etc should be m/.*\z/s in many file handling modules; fix
these insidious errors in File::Basename, File::Find and find2perl (from Tom Christiansen) TODO: many other modules need to be fixed as well! p4raw-id: //depot/perl@5296
Diffstat (limited to 'x2p/find2perl.PL')
-rw-r--r--x2p/find2perl.PL10
1 files changed, 5 insertions, 5 deletions
diff --git a/x2p/find2perl.PL b/x2p/find2perl.PL
index 99bb3afabb..b2e1054d50 100644
--- a/x2p/find2perl.PL
+++ b/x2p/find2perl.PL
@@ -90,7 +90,7 @@ while (@ARGV) {
$out .= &tab . "!";
next;
} elsif ($_ eq 'name') {
- $out .= &tab . '/' . &fileglob_to_re(shift) . "/";
+ $out .= &tab . '/' . &fileglob_to_re(shift) . "/s";
} elsif ($_ eq 'perm') {
my $onum = shift;
$onum =~ /^-?[0-7]+$/
@@ -139,9 +139,9 @@ while (@ARGV) {
} elsif ($_ eq 'size') {
$_ = shift;
my $n = 'int(((-s _) + 511) / 512)';
- if (s/c$//) {
+ if (s/c\z//) {
$n = 'int(-s _)';
- } elsif (s/k$//) {
+ } elsif (s/k\z//) {
$n = 'int(((-s _) + 1023) / 1024)';
}
$out .= &tab . &n($n, $_);
@@ -215,7 +215,7 @@ while (@ARGV) {
$initfile .= "open($fh, " . &quote('> ' . $file) .
qq{) || die "Can't open $fh: \$!\\n";\n};
$init{tar} = 1;
- } elsif (/^(n?)cpio$/) {
+ } elsif (/^(n?)cpio\z/) {
die "-$_ must have a filename argument\n" unless @ARGV;
my $file = shift;
my $fh = 'FH' . $file;
@@ -662,7 +662,7 @@ sub fileglob_to_re {
my $x = shift;
$x =~ s#([./^\$()])#\\$1#g;
$x =~ s#([?*])#.$1#g;
- "^$x\$";
+ "^$x\\z";
}
sub n {