perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Kobes <ra...@theoryx5.uwinnipeg.ca>
Subject Re: modperl-2 tests on Win32
Date Fri, 21 Dec 2001 06:46:14 GMT
On Thu, 20 Dec 2001, Doug MacEachern wrote:

> On Thu, 20 Dec 2001, Randy Kobes wrote:
>
> > Hi,
> >       Running the modperl-2 tests on Win32 runs into
> > problems of not finding things in @INC. I think this is
> > because when @INC is set in the add_inc sub of
> > Apache-Test/lib/Apache/TestConfig.pm, the "lib.pm" that's
> > being picked up is not Perl's system lib.pm but rather
> > mod_perl's Lib.pm in blib/lib (Win32 filenames aren't
> > case sensitive). I'm not sure the best way to handle this,
> > but this diff:
>
> hmm, there shouldn't be a blib/lib/Lib.pm
> can you see exactly what that is?  there should be a blib/lib/APR/Lib.pm

There is a blib/lib/Lib.pm, which is identical to
blib/lib/APR/Lib.pm. I think what's happened is that the
Makefile.PL in WrapXS/APR/ sees a 'Lib' subdirectory, and,
ignoring the case, treats it like a 'lib' subdirectory and
dutifully copies the files in WrapXS/APR/Lib to blib/lib. I
wasn't aware before that these shouldn't be copied there .. I
guess one solution is to write a MY::libscan to prevent this?

>
> > As well, the Win98 "shell" doesn't like the syntax
> >      do_something > to_somewhere && do_something_else
> > This is used in building libmodperl. This diff:
>
> wonder if we could do something like below, and make '&&' be ';' if $^O is
> win98?  what is the value of $^O for Win98?
>
> Index: lib/Apache/Build.pm
> ===================================================================
> RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
> retrieving revision 1.75
> diff -u -r1.75 Build.pm
> --- lib/Apache/Build.pm	2001/12/05 02:22:24	1.75
> +++ lib/Apache/Build.pm	2001/12/21 01:56:09
> @@ -870,6 +870,8 @@
>                                           $self->apxs(-q => $q));
>      }
>
> +    print $fh $self->canon_make_attr(sh_and => '&&');
> +
>      my $xs_targ = $self->make_xs($fh);
>
>      print $fh <<'EOF';
> @@ -893,7 +895,7 @@
>
>  .c.lo:
>  	$(MODPERL_CC) $(MODPERL_CCFLAGS_SHLIB) \
> -	-c $< && $(MODPERL_MV) $*$(MODPERL_OBJ_EXT) $*.lo
> +	-c $< $(MODPERL_SH_AND) $(MODPERL_MV) $*$(MODPERL_OBJ_EXT) $*.lo
>
>  .c$(MODPERL_OBJ_EXT):
>  	$(MODPERL_CC) $(MODPERL_CCFLAGS) -c $<
>
>

This would be neat, but I think Win9? is still too dumb
to understand this ... The '&&' does work for simple
things like
    cd .. && dir
but the problem with the above in the Makefile is that it treats
the '&&' as a source file argument to 'cl'. It may be possible to
get around this with quoting the arguments, but I haven't found
the right combination that works, and chances are it would break
Unix ... This isn't terribly important now, as it's just for
Win9? (actually, I'm not sure about XP) - it's fine as is on NT
and Win2K.

Just for future reference, on Win32 $^O is 'MSWin32'; to tell the
difference between Win9? and NT one can use Win32::IsWin95()
[true for Win9?] and Win32::IsWinNT() [true for NT and 2K],
which come with the Win32 module.

best regards,
randy


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


Mime
View raw message