The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::vaporcalc::Role::Calc - Calculate measurements for an e-liquid recipe

SYNOPSIS

  # See App::vaporcalc::Recipe, App::vaporcalc::RecipeResultSet
  use Moo;
  with 'App::vaporcalc::Role::Calc';

DESCRIPTION

This role provides a "calc" method that produces an App::vaporcalc::Result object.

See App::vaporcalc::Recipe, App::vaporcalc::RecipeResultSet.

REQUIRES

Consumers need to implement the following methods:

  # Method           Returning
  target_quantity    (ml)
  base_nic_per_ml    (mg/ml)
  base_nic_type      ('PG' or 'VG')
  target_nic_per_ml  (mg/ml)
  target_pg          (percentage)
  target_vg          (percentage)
  flavor_array       (an array of App::vaporcalc::Flavor objects)

METHODS

calc

Performs the calculation & returns an App::vaporcalc::Result object.

AUTHOR

Jon Portnoy <avenj@cobaltirc.org>