<?xml version="1.0" encoding="windows-1252"?>
<node id="1016235" title="Re: Disable LWP::Simple's autodeflating?" created="2013-01-31 02:00:26" updated="2013-01-31 02:00:26">
<type id="11">
note</type>
<author id="171588">
BrowserUk</author>
<data>
<field name="doctext">
&lt;blockquote&gt;&lt;i&gt;&lt;/i&gt;&lt;/blockquote&gt;
&lt;p&gt;Three possibilities:

&lt;ol&gt;&lt;li&gt;If you want the contents in a file, use &lt;c&gt;getstore&lt;/c&gt; instead of &lt;c&gt;get&lt;/c&gt; and writing it out yourself:&lt;code&gt;
perl -MLWP::Simple -e'getstore("file:/cpan/authors/id/P/PM/PMQS/Compress-Raw-Zlib-2.060.tar.gz", "Compress-Raw-Zlib-2.060.tar.gz" )'
&lt;/code&gt;
&lt;/li&gt;&lt;li&gt;Patch your copy of [mod://LWP::Simple] with a new method (say: getRaw() ) that returns the content rather than the decoded content::&lt;code&gt;
sub getRaw ($)
{
    my $response = $ua-&gt;get(shift);
##    return $response-&gt;decoded_content if $response-&gt;is_success;
    return $response-&gt;content if $response-&gt;is_success;
    return undef;
}
&lt;/code&gt;

&lt;/li&gt;&lt;li&gt;use &lt;c&gt;lwp-download [-a] &lt;url&gt; [&lt;local path&gt;]&lt;/c&gt;:&lt;code&gt;
lwp-download file:/cpan/authors/id/P/PM/PMQS/Compress-Raw-Zlib-2.060.tar.gz
&lt;/code&gt;
&lt;/li&gt;&lt;/ol&gt;

&lt;div class="pmsig"&gt;&lt;div class="pmsig-171588"&gt;
&lt;hr /&gt;
&lt;font size=1 &gt;
&lt;div&gt;With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'&lt;/div&gt;
&lt;div&gt;Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.&lt;/div&gt;
&lt;div&gt;"Science is about questioning the status quo. Questioning authority". &lt;/div&gt;
&lt;div&gt;In the absence of evidence, opinion is indistinguishable from prejudice.
&lt;/div&gt;
&lt;/font&gt;

&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
1016203</field>
<field name="parent_node">
1016203</field>
</data>
</node>
