You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Barbara Post <ba...@achatpublic.com> on 2003/11/28 19:21:07 UTC

RE : RE : bug : make test fails

OK, sorry for the offense, you're right.
The answer of the perl command line is an empty string.

$ perl -Mlib=Apache-Test/lib -MApache::TestRequest -le 'print
Apache::TestRequest::has_lwp'

$

I will install LWP on Monday then.

Barbara Post


-----Message d'origine-----
De : Stas Bekman [mailto:stas@stason.org] 
Envoyé : vendredi 28 novembre 2003 19:18
À : barbara post; mod_perl Dev
Objet : Re: RE : bug : make test fails


Barbara Post wrote:
> Hi Stas, thanks for forwarding it to the list.

And it'd be appreciated if you could stick on the list while resolving
it. We 
solve all the problems on the list and not offline, should someone else
come 
by the same problem, they will able to find the solution in the
archives. If 
you take it off-list the information becomes unavailable to others.

> The result doesn't seem nice :-/
> 
> CVS_DATA01# perl -MLWP -le 'print LWP->VERSION'
> Can't locate LWP.pm in @INC (@INC contains: 
> /usr/local/lib/perl5/site_perl/5.8.0/mach
> /usr/local/lib/perl5/site_perl/5.8.0 /usr/local/lib/perl5/site_perl 
> /usr/local/lib/perl5/5.8.0/BSDPAN /usr/local/lib/perl5/5.8.0/mach 
> /usr/local/lib/perl5/5.8.0 .). BEGIN failed--compilation aborted.

So you need to install LWP from CPAN.

Though we have a small client that does most of the job and I wonder why
it 
didn't work for you. Before you get LWP, can you please run this for me:

cd modperl-1.99_11
perl -Mlib=Apache-Test/lib -MApache::TestRequest -le \
'print Apache::TestRequest::has_lwp'


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com




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


Re: RE : RE : bug : make test fails

Posted by Stas Bekman <st...@stason.org>.
Barbara Post wrote:
> OK, sorry for the offense, you're right.

It wasn't an offense at all, sorry if I sounded like it was...

> The answer of the perl command line is an empty string.
> 
> $ perl -Mlib=Apache-Test/lib -MApache::TestRequest -le 'print
> Apache::TestRequest::has_lwp'

Thanks Barbara. I just wanted to double check that it didn't think that it had 
LWP installed when it didn't. For some reason I can't reproduce the problem.

> I will install LWP on Monday then.

Before you do that, can you please try applying this patch and see if it's 
still broken. I think it should work now fine without LWP:

Index: Apache-Test/lib/Apache/TestServer.pm
===================================================================
RCS file: 
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestServer.pm,v
retrieving revision 1.73
diff -u -r1.73 TestServer.pm
--- Apache-Test/lib/Apache/TestServer.pm	24 Nov 2003 08:28:34 -0000	1.73
+++ Apache-Test/lib/Apache/TestServer.pm	30 Nov 2003 20:57:57 -0000
@@ -584,10 +584,9 @@

      my $server_up = sub {
          local $SIG{__WARN__} = sub {}; #avoid "cannot connect ..." warnings
-        if (my $r = Apache::TestRequest::GET('/index.html')) {
-            return $r->code;
-        }
-        0;
+        # avoid fatal errors
+        my $r = eval { Apache::TestRequest::GET('/index.html') };
+        return !$@ && defined $r ? $r->code : 0;
      };

      if ($server_up->()) {



__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


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