NAME

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

SYNOPSIS

use App::vaporcalc::Recipe;

my $recipe = App::vaporcalc::Recipe->new(
  target_quantity   => 30,   # ml

  base_nic_type     => 'PG', # nicotine base type (VG/PG, default PG)
  base_nic_per_ml   => 100,  # mg/ml (base nicotine concentration)
  target_nic_per_ml => 12,   # mg/ml (target nicotine concentration)

  target_pg         => 65,   # target PG percentage
  target_vg         => 35,   # target VG percentage

  flavor_array => [
    +{ tag => 'Raspberry', percentage => 10, type => 'PG' },
    +{ tag => 'EM', percentage => 1, type => 'PG' },
    # ...
  ],

  notes   => [
    'My recipe',
    '10% flavor',
    '1% ethyl maltol'
  ],
);

my $result = $recipe->calc;
# See App::vaporcalc::Result

DESCRIPTION

An instance of this class represents an e-liquid recipe that can be calculated to produce per-ingredient ml quantities via App::vaporcalc::Role::Calc.

See App::vaporcalc, especially "WARNING" in App::vaporcalc.

ATTRIBUTES

target_quantity

The total target quantity, in ml.

base_nic_type

The base liquid type of the nicotine solution ('VG' or 'PG').

Defaults to 'PG'.

base_nic_per_ml

The concentration of the base nicotine solution, in mg/ml.

target_nic_per_ml

The target nicotine concentration, in mg/ml.

target_pg

The total percentage of PG.

target_vg

The total percentage of VG.

flavor_array

A (coercible, see SYNOPSIS) array of App::vaporcalc::Flavor objects.

notes

A List::Objects::WithUtils::Array containing an arbitrary number of notes attached to the recipe.

Can be coerced from a plain ARRAY.

METHODS

flavor_percentage

Calculates the total flavor percentage; see "flavor_array".

CONSUMES

App::vaporcalc::Role::Calc

App::vaporcalc::Role::Store

AUTHOR

Jon Portnoy <avenj@cobaltirc.org>