Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

addded code to evaluate JSON::XS::Boolean values.

  • Loading branch information...
commit 04c62e5445e006cb9b66704220346223a315c477 1 parent bf82432
three18ti authored

Showing 1 changed file with 5 additions and 0 deletions. Show diff stats Hide diff stats

  1. +5 0 source/Reddit/lib/Reddit.pm
5 source/Reddit/lib/Reddit.pm
@@ -241,6 +241,11 @@ sub get_user_info {
241 241 my $data = $decoded->{data};
242 242 print Dumper $data ;
243 243
  244 + foreach my $value ( values %$result ) {
  245 + next unless 'JSON::XS::Boolean' eq ref $value;
  246 + $value = $value ? '1' : '0' ;
  247 + }
  248 +
244 249 while (my ($key, $value) = each %{$data}) {
245 250 $self->user_info->$key("$value");
246 251 }

0 comments on commit 04c62e5

Please sign in to comment.
Something went wrong with that request. Please try again.