App-BPOMUtils-NutritionLabelRef

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

NAME
    App::BPOMUtils::NutritionLabelRef - Get one or more values from BPOM
    nutrition label reference (ALG, acuan label gizi)

VERSION
    This document describes version 0.004 of
    App::BPOMUtils::NutritionLabelRef (from Perl distribution
    App-BPOMUtils-NutritionLabelRef), released on 2024-06-13.

SYNOPSIS
DESCRIPTION
    This distribution includes CLI utilities related to BPOM nutrition label
    reference (ALG, acuan label gizi):

    *   alg

    *   bpom-get-nutrition-label-ref

FUNCTIONS
  bpom_get_nutrition_label_ref
    Usage:

     bpom_get_nutrition_label_ref(%args) -> [$status_code, $reason, $payload, \%result_meta]

    Get one or more values from BPOM nutrition label reference (ALG, acuan
    label gizi).

    Examples:

    *   List all nutrient (symbols):

         bpom_get_nutrition_label_ref(action => "list_nutrients");

        Result:

         [
           200,
           "OK",
           [
             "Alpha_Linoleic_Acid",
             "Biotin",
             "Ca",
         # ...snipped 31 lines for brevity...
             "VD",
             "VE",
             "VK",
             "Zn",
           ],
           {},
         ]

    *   List all groups (symbols):

         bpom_get_nutrition_label_ref(action => "list_groups");

        Result:

         [
           200,
           "OK",
           [
             "0to6mo",
             "1to3y",
             "7to11mo",
             "breastfeeding",
             "general",
             "pregnant",
           ],
           {},
         ]

    *   List all ALG values:

         bpom_get_nutrition_label_ref();

        Result:

         [
           200,
           "OK",
           [
             { symbol => "Energy", group => "0to6mo", ref => 550, unit => "kkal" },
             { symbol => "Energy", group => "7to11mo", ref => 725, unit => "kkal" },
             { symbol => "Energy", group => "1to3y", ref => 1125, unit => "kkal" },
             { symbol => "Energy", group => "general", ref => 2150, unit => "kkal" },
         # ...snipped 254 lines for brevity...
               symbol => "Myo_Inositol",
               group  => "breastfeeding",
               ref    => undef,
               unit   => "mg",
             },
           ],
           { "table.fields" => ["symbol", "group", "ref", "unit", "%alg"] },
         ]

    *   List ALG for vitamin D, for all groups:

         bpom_get_nutrition_label_ref(nutrient => "VD");

        Result:



( run in 2.465 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )