On Monday 10 September 2007 10:41:22 James Keenan via RT wrote:

> Better (to make sure that $ep is defined before we try a substitution on
> it):
>
> Index: config/init/install.pm
> ===================================================================
> --- config/init/install.pm    (revision 21171)
> +++ config/init/install.pm    (working copy)
> @@ -66,7 +66,9 @@
>      my ( $self, $conf ) = @_;
>
>      my $prefix  = $conf->options->get('prefix')      || "/usr/local";
> +    $prefix =~ s{/$}{};
>      my $ep = $conf->options->get('exec-prefix');
> +    $ep =~ s{/$}{} if defined $ep;
>      my $eprefix = $ep ? $ep : $prefix;
>
>      #  --bindir=DIR           user executables [EPREFIX/bin]

Is the chance that $prefix ends in slash-newline sufficiently rare that the $ 
anchor is better than \z?

(Yes, I *have* written code to work with Mac OS 9 filesystems; why are you 
looking at me as if I'm completely paranoid?)

-- c

Reply via email to