use Test::More; use WWW::CheckGzip; my $wc = WWW::CheckGzip->new (url => http://www.hooli.xyz/); # Call $wc->check (); ? ok ($wc->is_compressed); ok ($wc->is_smaller); ok ($wc->no_compress_without_header); done_testing ();
Something like WWW::Mechanize::GZip.
(1) Subclass LWP::UserAgent, not WWW::Mechanize.
(2) Use Gzip::Faster for compression tests
(3) Offer functions which can easily be added as "ok ($obj->is_compressed ())", etc. for Test::More compatilbility.
I would be interested to hear about
- Any other modules which do the same thing.
- Proposed added tests;
- Websites offering this service would be useful.
- Better naming or naming more consistent with Perl conventions.