sysread / Reddit-API

Reddit API for perl
22 stars 11 forks source link

Reddit account/access over 18 key #11

Closed aggrolite closed 9 years ago

aggrolite commented 9 years ago

Calling Reddit::Client's me subroutine produces the error Attempt to access disallowed key 'over_18' in a restricted hash at lib/Reddit/Client/Thing.pm line 56.

This is caused when Reddit::Client::Thing tries to set its fields within the set_bool subroutine. Perl (or the fields module) barfs at this point.

reproduce with:

$ perl -Ilib -MReddit::Client -e '$r = Reddit::Client->new(session_file => "~/reddit.json", user_agent => "Reddit::Client v1")->me'
Attempt to access disallowed key 'over_18' in a restricted hash at lib/Reddit/Client/Thing.pm line 56.

I've also added more fields for Reddit::Client::Account in a separate commit.

sysread commented 9 years ago

Thanks. This will go in the next version.