Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

CPAN Testing SSL requirements

by tqisjim (Beadle)
on Jun 07, 2013 at 19:06 UTC ( #1037738=perlquestion: print w/ replies, xml ) Need Help??
tqisjim has asked for the wisdom of the Perl Monks concerning the following question:

Reposted this earlier but never showed up. Let me know if this is a duplicate.

Trying to publish and support my new module Google::OAuth. The current version reports a pathetic 31% success rate from cpantesters. The failures report the following:

# Failed test 'LWP will support https URLs if the LWP::Protocol::htt +ps module # is installed.

I assume that the failing systems have no SSL library and an incomplete LWP::UserAgent stack. If that's true, how do I establish this requirement in Makefile.PL?

The point is to improve my cpantester score. A successful result is that systems that don't support https do not report a failure.

Thanks! Jim

Comment on CPAN Testing SSL requirements
Download Code
Re: CPAN Testing SSL requirements
by Corion (Pope) on Jun 07, 2013 at 19:13 UTC

    If you need HTTPS, you should list LWP::Protocol::https as a prerequisite. It is not a default with LWP::UserAgent, because it requires much more C support than the rest of LWP.

      Based on my experience, I believe that LWP::Protocol::https is automatically installed provided the SSL libraries are available. If it were my system, then, I might install LWP::UserAgent; load a library like openssl; and then re-install LWP::UserAgent to get https functionality. Am I confused about this?

      Either way, your recommendation makes perfect sense. My biggest concern is how the automated testers respond to these changes.

        This is counter to my experience, and also counter to what the Makefile.PL for libwww-perl does. Maybe reading the source code helps you reduce your confusion.

        I assume that the automated testers will "respond" to these changes by testing your new distribution, and either report nothing because they can't install the prerequisites, or report the new test results with the new prerequisites.

      How can I test your recommendation without setting up my own CPAN test bed without LWP::Protocol::https?

      As it stands, I encountered an obstacle right away. There is no defined $LWP::Protocol::https::VERSION. Under these circumstances, will the requirements test fail regardless of how I specify that module in Makefile.PL? I hate to ask, but since I don't know how to test it, is your answer a guess, or are you confident it will solve my problem?

      Thanks again! -Jim

        <c>$ perl -le " print for @INC C:/citrusperl/site/lib/MSWin32-x86-multi-thread C:/citrusperl/site/lib C:/citrusperl/vendor/lib C:/citrusperl/lib . $ perl -le " @INC = @INC[-2]; require LWP::Protocol::https; " Can't locate LWP/Protocol/https.pm in @INC (@INC contains: C:/citruspe +rl/lib) at -e line 1. $ cpanm -L extlib LWP::Protocol::https ... $ perl -e " @INC = ( q(extlib/lib/perl5), @INC[-2] ); require LWP::Pr +otocol::https; "

        You may or may not be interested in Test::Without::Module, or the younger and more maintained implementations whose names escape me.

        If you don't want to (or as in your case, can't) specify a version in your prerequisite, you can always use 0 or undef in place of the version number.

        If you doubt my recommendation, I recommend to just use it and watch how the CPAN testers behave. There is no fee involved, and they won't send you angry mails about breaking your prerequisites either.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1037738]
Approved by GrandFather
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2014-12-21 03:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (102 votes), past polls