in reply to CPAN Testing SSL requirements

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.

Replies are listed 'Best First'.
Re^2: CPAN Testing SSL requirements
by tqisjim (Beadle) on Jun 07, 2013 at 22:41 UTC

    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.

        OK RTFM:

        This module used to be bundled with the libwww-perl, but it was unbundled in v6.02 in order to be able to declare its dependencies properly for the CPAN tool-chain. Applications that need https support can just declare their dependency on LWP::Protocol::https and will no longer need to know what underlying modules to install.
Re^2: CPAN Testing SSL requirements
by tqisjim (Beadle) on Jun 07, 2013 at 23:11 UTC

    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

      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.

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