Group
Extension

Matches 1

WWW-Yahoo-Smushit ( F/FV/FVOX/WWW-Yahoo-Smushit-0.03.tar.gz, FVOX, 2011; MetaCPAN )
WWW-Yahoo-Smushit/lib/WWW/Yahoo/Smushit.pm ( view source; MetaCPAN )
package WWW::Yahoo::Smushit;

use strict;
use warnings;
use Moose;
use LWP::UserAgent;
use JSON;

our $VERSION = '0.03';

has _ua => (
    is       => 'rw',
    lazy     => 1,
    required => 1,
    d
    my $json = JSON->new->allow_nonref;
    my $resp = $json->decode($req->content);
    return 1
      if($self->_create_attrs_from_json($resp));

    return 0;
}

sub _create_attrs_from_json {
    m
y ($self, $json) = @_;

    for (keys %{$json}) {
        $self->meta->add_attribute($_, is => 'rw');
        $self->$_($json->{$_});
    }

    $self->meta->make_immutable;

    return 0
      if not

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.