in reply to Re^2: Forcing HTTP/1.0 and mangling headers
in thread Forcing HTTP/1.0 and mangling headers
'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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Forcing HTTP/1.0 and mangling headers
by yam (Novice) on Jan 16, 2007 at 16:59 UTC |