Skip Menu |

This queue is for tickets about the Crypt-OFB CPAN distribution.

Report information
The Basics
Id: 86368
Status: new
Priority: 0/
Queue: Crypt-OFB

People
Owner: Nobody in particular
Requestors: leonerd-cpan [...] leonerd.org.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Should use definedness not truth in unpacking arguments
On a quick skim of your code, one thing jumps out at me. In sub crypt: my $data = shift || $_ || ''; This will likely cause problems for any that happens to appear numerically zero, such as ->crypt( "00000000" ) ->crypt( "0\nabcde" ) etc... This should be fixed; ideally with use 5.010; ... my $data = shift // $_ // ''; so that it uses definedness instead. Failing that to keep 5.8 compatibility, perhaps an explicit ? : test: my $data = @_ ? shift : defined $_ ? $_ : ''; -- Paul Evans