Skip to content

Commit

Permalink
Do not use Perl 5.10 defined-or operator, so we can run on Perl 5.8. C…
Browse files Browse the repository at this point in the history
…loses #1.
  • Loading branch information
Gregor N. Purdy, Sr committed May 6, 2012
1 parent 8adcd31 commit c784650
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/MAS/TIFF/Compression/LZW.pm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ sub new {
my $bytes = shift;

return bless {
BYTES => $bytes // '',
BYTES => defined($bytes) ? $bytes : '',
BYTE_INDEX => 0,
BIT_INDEX => 0,
BYTE => undef,
Expand Down Expand Up @@ -128,7 +128,7 @@ sub write_code {

# printf "Writing %d bit code %s\n", $size, $code;

my $byte = $self->{BYTE} // 0;
my $byte = defined($self->{BYTE}) ? $self->{BYTE} : 0;
my $bit_index = $self->{BIT_INDEX};

my $remaining = $size;
Expand Down

0 comments on commit c784650

Please sign in to comment.