Subject: | bug in piece_length(), misreported value |
let's do this instead. i have only seen piece length as a "piece length" key, never "piece_length".
sub piece_length {
my $self = shift;
my $len = shift;
if(defined($len)) {
$self->{'data'}->{'info'}->{'piece_length'} = $len;
}
return $self->{'data'}->{'info'}->{'piece_length'} ||
$self->{'data'}->{'info'}->{'piece length'};
}