Subject: | Uncompress not working when the input is a substr exrepssion |
Date: | Mon, 11 May 2015 16:37:23 +0300 |
To: | bug-Compress-LZ4 [...] rt.cpan.org |
From: | "Roey Almog (Infoneto Ltd)" <almog [...] infoneto.co.il> |
Hi,
Strange bug in ActivePerl Perl 5.18.4 working with ActivePerl 5.8.9
When input to uncompress is an substr expression and not a variable it
returns empty string
The example below works on ActivePerl 5.8.9 but not on ActivePerl 5.18.4
use Compress::LZ4;
my $data = "Lorem ipsum dolor sit amet, his aperiri singulis eu.
Duo ea veniam audiam apeirian. Omnis partiendo sit ne,
ei cum meliore argumentum. Nullam hendrerit aliquando cu vis.
In vel assueverit concludaturque, no eam nonumy primis.
Ex vis molestiae efficiantur necessitatibus.";
my $compressed = 'C' . compress($data);
my $original = uncompress(substr($compressed, 1));
print "Original with substr $original\n";
my $temp = substr($compressed, 1);
$original = uncompress($temp);
print "Original with variable $original\n";