LWP + libcurl

21
LWP + libcurl As simple as setting an environment variable! Stanislaw Pusep - 2013

description

LWP::Protocol::Net::Curl: getting the best of the both worlds; available now in a CPAN mirror near you!

Transcript of LWP + libcurl

Page 1: LWP + libcurl

LWP + libcurlAs simple as setting an environment variable!

Stanislaw Pusep - 2013

Page 2: LWP + libcurl

LWPa.k.a. libwww-perl

Page 3: LWP + libcurl

LWPa.k.a. libwww-perl

• Whipuptitude

Page 4: LWP + libcurl

LWPa.k.a. libwww-perl

• Whipuptitude

• Very popular in the Perl community

Page 5: LWP + libcurl

LWPa.k.a. libwww-perl

• Whipuptitude

• Very popular in the Perl community

• 1,691 CPAN modules depend on LWP!

Page 6: LWP + libcurl

LWPa.k.a. libwww-perl

• Whipuptitude

• Very popular in the Perl community

• 1,691 CPAN modules depend on LWP!• $ perl -MLWP::Simple -E 'get("https://metacpan.org");say~~keys%INC'

Page 7: LWP + libcurl

LWPa.k.a. libwww-perl

• Whipuptitude

• Very popular in the Perl community

• 1,691 CPAN modules depend on LWP!• $ perl -MLWP::Simple -E 'get("https://metacpan.org");say~~keys%INC'

• Loads 122 modules at runtime :(

Page 8: LWP + libcurl

libcurl

Page 9: LWP + libcurl

libcurl

• Manipulexity

Page 10: LWP + libcurl

libcurl

• Manipulexity

• Dozens of protocols supported out-of-box!

Page 11: LWP + libcurl

libcurl

• Manipulexity

• Dozens of protocols supported out-of-box!

• Very popular outside of the Perl community

Page 12: LWP + libcurl

libcurl

• Manipulexity

• Dozens of protocols supported out-of-box!

• Very popular outside of the Perl community

• Many options!

Page 13: LWP + libcurl

libcurl

• Manipulexity

• Dozens of protocols supported out-of-box!

• Very popular outside of the Perl community

• Many options!

• Too many options :(

Page 14: LWP + libcurl

cpanm LWP::Protocol::Net::Curl

Page 15: LWP + libcurl

cpanm LWP::Protocol::Net::Curl

• use LWP::Protocol::Net::Curl;

Page 16: LWP + libcurl

cpanm LWP::Protocol::Net::Curl

• use LWP::Protocol::Net::Curl;

• No black magic!

Page 17: LWP + libcurl

cpanm LWP::Protocol::Net::Curl

• use LWP::Protocol::Net::Curl;

• No black magic!

• Except...

Page 18: LWP + libcurl

cpanm LWP::Protocol::Net::Curl

• use LWP::Protocol::Net::Curl;

• No black magic!

• Except...• PERL5OPT=-MLWP::Protocol::Net::Curl ...

Page 19: LWP + libcurl

cpanm LWP::Protocol::Net::Curl

• use LWP::Protocol::Net::Curl;

• No black magic!

• Except...• PERL5OPT=-MLWP::Protocol::Net::Curl ...

• PERL5OPT=-MLWP::Protocol::Net::Curl=verbose,0 ...

Page 20: LWP + libcurl

cpanm LWP::Protocol::Net::Curl

• use LWP::Protocol::Net::Curl;

• No black magic!

• Except...• PERL5OPT=-MLWP::Protocol::Net::Curl ...

• PERL5OPT=-MLWP::Protocol::Net::Curl=verbose,0 ...

• This way, passes LWP & WWW::Mechanize tests!

Page 21: LWP + libcurl

Thank you!

• cpan.me/LWP::Protocol::Net::Curl

• github.com/creaktive