Subject: | Produces warnings when used in another program, ie "perl -e'use Net::FSP'" |
Possible precedence issue with control flow operator at /usr/local/share/perl/5.20.2/Net/FSP/Handle/Read.pm line 78.
Possible precedence issue with control flow operator at /usr/local/share/perl/5.20.2/Net/FSP.pm line 162.
Possible precedence issue with control flow operator at /usr/local/share/perl/5.20.2/Net/FSP.pm line 191.
I think I have fixed these in a patch (no more run-time warnings), but don't have an FSP server to test connecting to, so please review. Problems exist in both FSP.pm and FSP/Handle/Read.pm (line 78).
Thanks,
Jim Turner
Subject: | FSP.diff |
162c162,164
< return defined recv $self->{socket}, ${$response}, $self->{max_payload_size} + $HEADER_SIZE, 0 or _check_fatal('Could not receive');
---
> #JWT:CHGD. TO NEXT 20160120 TO FIX WARNING: return defined recv $self->{socket}, ${$response}, $self->{max_payload_size} + $HEADER_SIZE, 0 or _check_fatal('Could not receive');
> my $res = recv($self->{socket}, ${$response}, $self->{max_payload_size} + $HEADER_SIZE, 0);
> return defined($res) ? $res : _check_fatal('Could not receive');
188,189c190,191
< return
< $value_for->{checksum} == _checksum($response, 0)
---
> #JWT:CHGD. TO NEXT 20160120 TO FIX WARNING: return
> return ($value_for->{checksum} == _checksum($response, 0)
192c194
< and not($pos_must_match_for{ $value_for->{command} } && $send_pos != $value_for->{pos});
---
> and not($pos_must_match_for{ $value_for->{command} } && $send_pos != $value_for->{pos})) ? 1 : 0;
Subject: | Read.diff |
78c78,79
< return $self->{eof} and $self->{buffer} eq '';
---
> #JWT:CHGD. TO NEXT 20160120 TO FIX WARNING: return $self->{eof} and $self->{buffer} eq '';
> return ($self->{eof} && $self->{buffer} eq '') ? 1 : 0;