You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Nikolay Ananiev <an...@thegdb.com> on 2006/10/04 12:49:21 UTC

Add error msg for MP_AP_PREFIX

I tried to install mp2 with perl Makefile.PL MP_AP_PREFIX=c:\some\path
but the path was wrong and I got this ugly message:

Use of uninitialized value in concatenation (.) or string at
lib/ModPerl/BuildOp
tions.pm line 138, <DATA> line 23.

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";
+                }
             }

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




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


Re: Add error msg for MP_AP_PREFIX

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Paul Johnson wrote:
> On Wed, Oct 04, 2006 at 01:49:21PM +0300, Nikolay Ananiev wrote:
> 
>> This patch adds a nice error message.
Committed revision 453096. ( -d version)

This will be in 2.0.3-rc2 and thus 2.0.3.

Thanks.


-- 
------------------------------------------------------------------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

When I call your name, Girl, it starts to flame
Burning in my heart, Tearing it all apart..
No matter how I try My love I cannot hide....

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


Re: Add error msg for MP_AP_PREFIX

Posted by Nikolay Ananiev <an...@thegdb.com>.
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" <pa...@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


Re: Add error msg for MP_AP_PREFIX

Posted by Paul Johnson <pa...@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