Group
Extension

Matches 6

App-vaporcalc ( A/AV/AVENJ/App-vaporcalc-0.005004.tar.gz, AVENJ, 2016; MetaCPAN )
App-vaporcalc/lib/App/vaporcalc/Result.pm ( view source; MetaCPAN )
$self->flavor_total }

method TO_JSON {
  +{
    map {; 
      my ($attr, $val) = ($_, $self->$_);
      my $raw = blessed $val && $val->can('TO_JSON') ? $val->TO_JSON : $val;
      $attr => $raw
    

      flavors
    /,
  }
}

with 'App::vaporcalc::Role::Store';

1;

=pod

=for Pod::Coverage TO_JSON

=head1 NAME

App::vaporcalc::Result - A calculated App::vaporcalc::Recipe result

=head1 SYNOPSI
App-vaporcalc ( A/AV/AVENJ/App-vaporcalc-0.005004.tar.gz, AVENJ, 2016; MetaCPAN )
App-vaporcalc/lib/App/vaporcalc/Role/UI/Cmd.pm ( view source; MetaCPAN )
calc::Cmd::Result->new(%params)
}

method munge_recipe (%params) {
  my $data = $self->recipe->TO_JSON;
  $data->{$_} = $params{$_} for keys %params;
  App::vaporcalc::Recipe->new(%$data)
}

1;

=pod
y $new_recipe = $self->munge_recipe( 
    target_vg => 50, 
    target_pg => 50 
  );

Calls C<TO_JSON> on the current L</recipe> object, merges in the
given key/value pairs, and returns a new L<App::
App-vaporcalc ( A/AV/AVENJ/App-vaporcalc-0.005004.tar.gz, AVENJ, 2016; MetaCPAN )
App-vaporcalc/lib/App/vaporcalc/Flavor.pm ( view source; MetaCPAN )
d TO_JSON {
  +{
    percentage => $self->percentage,
    tag        => $self->tag,
    type       => $self->type,
  }
}

with 'App::vaporcalc::Role::Store';

1;

=pod

=for Pod::Coverage TO_JSON

=he
App-vaporcalc ( A/AV/AVENJ/App-vaporcalc-0.005004.tar.gz, AVENJ, 2016; MetaCPAN )
App-vaporcalc/lib/App/vaporcalc/Recipe.pm ( view source; MetaCPAN )
  }
  }

  \%params
}

method TO_JSON {
  +{
    map {; 
      my ($attr, $val) = ($_, $self->$_);
      my $raw = blessed $val && $val->can('TO_JSON') ? $val->TO_JSON : $val;
      $attr => $raw
    
ole::Calc',
     'App::vaporcalc::Role::Store' ;

1;

=pod

=for Pod::Coverage BUILD BUILDARGS TO_JSON

=head1 NAME

App::vaporcalc::Recipe - An e-liquid recipe

=head1 SYNOPSIS

  use App::vaporcalc:
App-vaporcalc ( A/AV/AVENJ/App-vaporcalc-0.005004.tar.gz, AVENJ, 2016; MetaCPAN )
App-vaporcalc/lib/App/vaporcalc/Role/Store.pm ( view source; MetaCPAN )
= '0.005004';
use Defaults::Modern;

use JSON::MaybeXS 1.001 ();

use Role::Tiny;

requires 'TO_JSON';

method save ( (Str | Path) $path ) {
  my $jseng = JSON::MaybeXS->new(
    utf8            => 1,
 1,
  );

  my $json  = $jseng->encode($self)
    || confess "Could not encode JSON: ".$jseng->error;

  path($path)->spew_utf8($json)
}

method load ( (Str | Path) $path ) {
  my $json  = path($path)
->slurp_utf8;
  my $jseng = JSON::MaybeXS->new(
    utf8      => 1,
    relaxed   => 1,
  );

  my $data  = $jseng->decode($json)
    || confess "Could not decode JSON: ".$jseng->error;

  $self->_loa
App-vaporcalc ( A/AV/AVENJ/App-vaporcalc-0.005004.tar.gz, AVENJ, 2016; MetaCPAN )
App-vaporcalc/lib/App/vaporcalc/RecipeResultSet.pm ( view source; MetaCPAN )
sub { shift->recipe->calc },
);

method TO_JSON {
  +{ recipe => $self->recipe }
}

with 'App::vaporcalc::Role::Store';

1;

=pod

=for Pod::Coverage TO_JSON

=head1 NAME

App::vaporcalc::RecipeResult

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