'use' gets executed out of order. You'll either need to switch to 'require', place it in a BEGIN block, or set it before you run the script:
$ perl -e 'use LWP; print LWP::Protocol::implementor("https"),"\n";' LWP::Protocol::https $ perl -e 'use LWP; $ENV{"PERL_LWP_USE_HTTP_10"}=1; print LWP::Protoco +l::implementor("https"),"\n";' LWP::Protocol::https $ perl -e '$ENV{"PERL_LWP_USE_HTTP_10"}=1; use LWP; print LWP::Protoco +l::implementor("https"),"\n";' LWP::Protocol::https $ perl -e '$ENV{"PERL_LWP_USE_HTTP_10"}=1; require 'LWP'; print LWP::P +rotocol::implementor("https"),"\n";' LWP::Protocol::https10 $ perl -e 'BEGIN { $ENV{"PERL_LWP_USE_HTTP_10"}=1; } use LWP; print LW +P::Protocol::implementor("https"),"\n";' LWP::Protocol::https10 $ export PERL_LWP_USE_HTTP_10=1; perl -e 'use LWP; print LWP::Protocol +::implementor("https"),"\n";' LWP::Protocol::https10
In reply to Re^3: Forcing HTTP/1.0 and mangling headers
by jhourcle
in thread Forcing HTTP/1.0 and mangling headers
by yam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |