Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • ... when are you going to get red of whatever test server you are using for the test scripts that keeps failing and causing mech to be an unreliable dependency?

    I've started to migrate away from mechanize back to raw lwp in a few applications, simply because mech has become too unreliable.
    • I didn't know it was a problem until you mentioned it yesterday. I'm open to alternatives.


      • In the past I think it failed most of the time on cygwin, due to the forking necessary for the server I believe, and I pretty much went back to LWP in spite of how nice mech seems (although mech can be an install festival).

        Maybe the first thing you could do would be test that mech tests still fails on cygwin (untested Mech 1.32, fails 1.3102, untested 1.3101, fail:pass 5:1 1.30, etc.).

        And then test the many flavors of http servers that might work. Just run there tests on Cygwin or review their results on the test-result server.

        If you have no cygwin, I could run things for you.

        I have the latest cygwin, and cygwin supplied perl, and mech hangs on t/local/back after reporting test 12 and failing 5,6,9...

        ok 1 - use WWW::Mechanize;
        ok 2 - The object isa WWW::Mechanize
        ok 3 - this $mech starts with a cookie jar
        # Started http://localhost:1748/ [localhost]
        ok 4 - The object isa LocalServer

        not ok 5 - Fetched OK
        # Failed test 'Fetched OK'
        # at t/local/back.t line 52.

        not ok 6 - Followed OK
        # Failed test 'Followed OK'
        # at t/local/back.t line 58.
        ok 7 - Did the base get set back?

        # Failed test 'Followed OK'
        ok 8 - Title set back?
        # at t/local/back.t line 65.
        not ok 9 - Followed OK
        ok 10 - Did the base get set back?No form defined at t/local/back.t line 72

        ok 11 - Title set back?
        ok 12 - Pre-search check


        [ctrl c]

        $ perl -V
        Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
                osname=cygwin, osvers=1.5.24(0.15642), archname=cygwin-thread-multi-64int
                uname='cygwin_nt-5.1 reini 1.5.24(0.15642) 2007-01-31 10:57 i686 cygwin '
                config_args='-de -Dmksymlinks -Duse64bitint -Dusethreads -Uusemymalloc -Dopt
        imize=-O3 -Dman3ext=3pm -Dusesitecustomize -Dusedevel'
                hint=recommended, useposix=true, d_sigaction=define
                usethreads=define use5005threads=undef useithreads=define usemultiplicity=de
                useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
                use64bitint=define use64bitall=undef uselongdouble=undef
                usemymalloc=n, bincompat5005=undef
                cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -Wdecl
                cppflags='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -Wdeclaration-af
                ccversion='', gccversion='3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
        ', gccosandvers=''
                intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
                d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
                ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lsee
                alignbytes=8, prototype=define
            Linker and Libraries:
                ld='ld2', ldflags =' -s -L/usr/local/lib'
                libpth=/usr/local/lib /usr/lib /lib
                libs=-lgdbm -ldb -ldl -lcrypt -lgdbm_compat
                perllibs=-ldl -lcrypt -lgdbm_compat
                libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=libperl.a
            Dynamic Linking:
                dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' -s'
                cccdlflags=' ', lddlflags=' -s -L/usr/local/lib'

        Characteristics of this binary (from libperl):
            Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT
                                                        PERL_MALLOC_WRAP PERL_USE_SAFE_PUTENV
                                                        USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
                                                        USE_PERLIO USE_REENTRANT_API USE_SITECUSTOMIZE
            Locally applied patches:
                        CYG01 - ldflags -s
                        CYG02 - lib-ExtUtils-Embed insensitive against leading \s
                        CYG03 - lib-Test-Harness-Straps $ENV{PERL5LIB} = ''
                        CYG04 - cygperl-5_8.dll and not cygperl-5_8_x.dl
                        CYG05 - add Win32CORE to core
                        CYG07 - File-Spec-Cygwin-TMPDIR.patch
                        Bug#38628 - allow legacy Cwd->cwd()
                        Bug#40103 - File-Spec-case_tolerant.patch from 5.9.5
            Built under cygwin
            Compiled at Jul 8 2007 19:12:08
            @INC: /usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 /usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin /usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8

        • I can't test it on Cygwin. Regardless, my question still stands: What should I run my tests against instead?


          • I think you could fix the problems with your testing if you used a cross-platform, CPAN-tested local httpd rather than the included . Maybe you could pick a CPAN httpd that passes tests on cygwin and ActiveState and Linux etc.

            NOT HTTP-Server-Simple, NOT HTTP-Server-Brick, but get twisted with POE-Component-Server-SimpleHTTP, or take what is probably the easy way with Net::HTTPServer notably 1.1.1, a distribution which shows only one fail on CPAN-Testers for about 60 submissions on various v
            • Can you help out on this at all? Also, what's wrong with HTTP::Server::Simple?


              • I can help out. I already put Net::HTTPServer on my cygwin and ActiveState Perl MSWin32.

                For starters, I can pick up a distribution using Net::HTTPServer for the back.t test, passing on your platform, from a url you supply and run the tests on cygwin and ActiveState MSWin32. That would mean you change your test to use Net::HTTPServer over

                If you want me to do make the changes, I will need to learn some of your code first, and I may bail, but likely will get to it in time. I like mech, but
                • I'd be glad to have your help. The Mech code lives on Google Code. I'd also really like to be able to get rid of the cut 'n' paste in the t/ directory to support it all.

                  What can I do to help you?



                  • Did you get my emails to I am This is getting into the weeds.

                    In t/local/*.t, change:

                      delete @ENV{ qw( http_proxy HTTP_PROXY ) };


                    foreach my $proxy (grep {/http_proxy/i} keys %ENV ) {delete $ENV{$proxy}}

                    because believe it or not, Win XP takes my definition of environmental variable 'http_proxy' and kindly gives me 'HTTP_PROXY' and 'HTTP_proxy'. Whereas for 'ftp_proxy' I only seem to get 'FTP_PROXY' as a bonus.

                    That change lets me pass t/local/back.t .
                    • Actually, the HTTP_proxy problem seems to be in cygwin perl only, not due to XP, because ActiveStatePerl does not do show the problem. Guess I should file a bug report somewhere...

                      C:/ActiveStatePerl/bin/perl -e 'foreach my $proxy (grep {/_proxy/i} keys %ENV) {print "\$ENV{$proxy} => $ENV{$proxy} \n" ; delete $ENV{$proxy}; } '

                      If I leave my http_proxy and set my environment no_proxy to localhost, I can pass almost every test, except that HTTP:Daemon is a smart ass and uses my machine name instead of local
                    • No need to write C in Perl:

                      delete @ENV{ grep { /http_proxy/i } keys %ENV };
                    • Can you please summarize to [] and carry on commentary there?