perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikolay Ananiev" <anan...@thegdb.com>
Subject Re: Add error msg for MP_AP_PREFIX
Date Wed, 04 Oct 2006 13:49:38 GMT
You're right. -d seems better.

Index: BuildOptions.pm
===================================================================
--- BuildOptions.pm (revision 452813)
+++ BuildOptions.pm (working copy)
@@ -121,6 +121,11 @@
                     require Win32;
                     $val = Win32::GetShortPathName($val);
                 }
+
+                if (!$val || !-d $val) {
+                    error "MP_AP_PREFIX must point to a valid directory.";
+                    die "\n";
+                }
             }

             if ($table->{$key}->{append}){



"Paul Johnson" <paul@pjcj.net> wrote in message
news:20061004131734.GH7966@pjcj.net...
> On Wed, Oct 04, 2006 at 01:49:21PM +0300, Nikolay Ananiev wrote:
>
> > This patch adds a nice error message.
> >
> > Index: BuildOptions.pm
> > ===================================================================
> > --- BuildOptions.pm (revision 452813)
> > +++ BuildOptions.pm (working copy)
> > @@ -121,6 +121,11 @@
> >                      require Win32;
> >                      $val = Win32::GetShortPathName($val);
> >                  }
> > +
> > +                if (!$val || !-e $val) {
> > +                    error "MP_AP_PREFIX must point to a valid
directory.";
> > +                    die "\n";
> > +                }
>
> Perhaps -d instead?
>
> --
> Paul Johnson - paul@pjcj.net
> http://www.pjcj.net




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message