App-ENumberUtils

 view release on metacpan or  search on metacpan

lib/App/ENumberUtils.pm  view on Meta::CPAN

package App::ENumberUtils;

use 5.010001;
use strict 'subs', 'vars';
use utf8;
use warnings;
use Log::ger;

use Exporter 'import';
use Perinci::Sub::Gen::AccessTable qw(gen_read_table_func);

our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2023-03-01'; # DATE
our $DIST = 'App-ENumberUtils'; # DIST
our $VERSION = '20230301.0.2'; # VERSION

our @EXPORT_OK = qw(
                       list_enumbers
                       list_enumber_ranges
               );

our %SPEC;

# BEGIN FRAGMENT id=meta-e_number varname=meta_e_number
# note: This fragment's content is generated by a script. Do not edit manually!
# src-file: /home/u1/repos/gudangdata/bin/../table/e_number/meta.yaml
# src-revision: 1014b595f7c80ead3654b93bd44335dba6d23831 (Wed Mar 1 14:15:02 2023 +0700)
# generate-date: Wed Mar  1 16:44:19 2023 UTC
# generated-by: update-fragments-in-perl-module
our $meta_e_number = {
  fields => {
    code        => {
                     filterable_regex => "Yes",
                     pos => 0,
                     schema => ["str*", { match => "^E[1-9][0-9]{2,3}" }],
                     sortable => "Yes",
                     summary => "Code",
                     unique => "Yes",
                   },
    color_index => {
                     filterable_regex => "Yes",
                     pos => 4,
                     schema => "posint*",
                     sortable => "Yes",
                     summary => "Colour Index (CI number)",
                     unique => "No",
                   },
    colour      => {
                     filterable_regex => "Yes",
                     pos => 3,
                     schema => "str*",
                     sortable => "Yes",
                     summary => "Colour",
                     unique => "No",
                   },
    names       => {
                     filterable_regex => "Yes",
                     pos => 1,
                     schema => "str*",
                     sortable => "Yes",
                     summary => "Name(s)",
                     unique => "No",
                   },
    purpose     => {
                     filterable_regex => "Yes",
                     pos => 2,
                     schema => "str*",
                     sortable => "Yes",
                     summary => "Purpose",
                     unique => "No",
                   },
    status      => {
                     filterable_regex => "Yes",
                     pos => 5,
                     schema => "str*",
                     sortable => "Yes",
                     summary => "Colour",
                     unique => "No",
                   },
  },
  pk => "code",
  summary => "E number",
};
# END FRAGMENT id=meta-e_number

# BEGIN FRAGMENT id=data-e_number varname=data_e_number
# note: This fragment's content is generated by a script. Do not edit manually!
# src-file: /home/u1/repos/gudangdata/bin/../table/e_number/data.csv
# src-revision: 1014b595f7c80ead3654b93bd44335dba6d23831 (Wed Mar 1 14:15:02 2023 +0700)
# generate-date: Wed Mar  1 16:44:19 2023 UTC
# generated-by: update-fragments-in-perl-module
our $data_e_number = [
  ["code", "names", "purpose", "color", "color_index", "status"],
  [
    "E100",
    "Curcumin (from turmeric)",
    "color",
    "Yellow-orange",
    "",
    "Approved in the EU.[8] Approved in the US.[9]",
  ],
  [
    "E101",
    "Riboflavin (Vitamin B2), formerly called lactoflavin",
    "color",
    "Yellow-orange",
    "",
    "Approved in the EU.[8] Approved in the US.[9]",
  ],
  [
    "E101a",
    "Riboflavin-5'-Phosphate",
    "color",
    "Yellow-orange",
    "",
    "Approved in the EU.[8]",
  ],
  [
    "E102",
    "Tartrazine (FD&C Yellow 5)",
    "color",
    "Yellow",
    19140,
    "Approved in the EU.[8] Approved in the US.[9]",
  ],
  ["E103", "Alkannin[10]", "color", "Red-brown", "", ""],
  [
    "E104",
    "Quinoline Yellow WS",
    "color",
    "Dull or greenish yellow",
    47005,
    "Restricted use approved in the EU.[8][11]",
  ],
  ["E105", "Fast Yellow AB", "color", "Yellow", "", ""],
  [
    "E106",
    "Riboflavin-5-Sodium Phosphate",
    "color",
    "Yellow",
    "",
    "",
  ],
  ["E107", "Yellow 2G", "color", "Yellow", "", ""],
  [
    "E110",
    "Sunset Yellow FCF (Orange Yellow S, FD&C Yellow 6)",
    "color",
    "Yellow-orange",
    15985,
    "Restricted use approved in the EU.[8][11] Banned in Norway.[12] Products in the EU require warnings and its use is being phased out.[11] Approved in the US.[9]",

lib/App/ENumberUtils.pm  view on Meta::CPAN

  [
    "E1452",
    "Starch aluminium octenyl succinate",
    "",
    "",
    "",
    "Approved in the EU.[20]",
  ],
  ["E1501", "Benzylated hydrocarbons", "", "", "", ""],
  ["E1502", "Butane-1, 3-diol", "", "", "", ""],
  ["E1503", "Castor oil", "resolving agent", "", "", ""],
  ["E1504", "Ethyl acetate", "flavour solvent", "", "", ""],
  [
    "E1505",
    "Triethyl citrate",
    "foam stabiliser",
    "",
    "",
    "Approved in the EU.[20]",
  ],
  ["E1510", "Ethanol", "", "", "", ""],
  ["E1516", "Glyceryl monoacetate", "flavour solvent", "", "", ""],
  [
    "E1517",
    "Glyceryl diacetate or diacetin",
    "flavour solvent",
    "",
    "",
    "",
  ],
  [
    "E1518",
    "Glyceryl triacetate or triacetin",
    "humectant and flavour solvent",
    "",
    "",
    "Approved in the EU.[20]",
  ],
  ["E1519", "Benzyl alcohol", "", "", "", ""],
  [
    "E1520",
    "Propylene glycol",
    "humectant and flavour solvent",
    "",
    "",
    "Approved in the EU.[20]",
  ],
  [
    "E1521",
    "Polyethylene glycol 8000[33]",
    "",
    "",
    "",
    "Approved in 2010[25]",
  ],
  ["E1525", "Hydroxyethyl cellulose", "thickening agent", "", "", ""],
];
# END FRAGMENT id=data-e_number

# BEGIN FRAGMENT id=meta-e_number_range varname=meta_e_number_range
# note: This fragment's content is generated by a script. Do not edit manually!
# src-file: /home/u1/repos/gudangdata/bin/../table/e_number_range/meta.yaml
# src-revision: 1014b595f7c80ead3654b93bd44335dba6d23831 (Wed Mar 1 14:15:02 2023 +0700)
# generate-date: Wed Mar  1 16:44:19 2023 UTC
# generated-by: update-fragments-in-perl-module
our $meta_e_number_range = {
  fields => {
    description => {
      filterable_regex => "Yes",
      pos => 2,
      schema => "str*",
      sortable => "Yes",
      summary => "Description",
      unique => "No",
    },
    range => {
      filterable_regex => "Yes",
      pos => 0,
      schema => ["str*"],
      sortable => "Yes",
      summary => "Range",
      unique => "No",
    },
    subrange => {
      filterable_regex => "Yes",
      pos => 1,
      schema => ["str*"],
      sortable => "Yes",
      summary => "Subrange",
      unique => "Yes",
    },
  },
  pk => "subrange",
  summary => "E number range",
};
# END FRAGMENT id=meta-e_number_range

# BEGIN FRAGMENT id=data-e_number_range varname=data_e_number_range
# note: This fragment's content is generated by a script. Do not edit manually!
# src-file: /home/u1/repos/gudangdata/bin/../table/e_number_range/data.csv
# src-revision: 1014b595f7c80ead3654b93bd44335dba6d23831 (Wed Mar 1 14:15:02 2023 +0700)
# generate-date: Wed Mar  1 16:44:19 2023 UTC
# generated-by: update-fragments-in-perl-module
our $data_e_number_range = [
  ["range", "subrange", "description"],
  ["100-199", "100-199", "Colours"],
  ["100-199", "100-109", "yellows"],
  ["100-199", "110-119", "oranges"],
  ["100-199", "120-129", "reds"],
  ["100-199", "130-139", "blues and violets"],
  ["100-199", "140-149", "greens"],
  ["100-199", "150-159", "browns and blacks"],
  ["100-199", "160-199", "gold and others"],
  ["200-299", "200-299", "Preservatives"],
  ["200-299", "200-209", "sorbates"],
  ["200-299", "210-219", "benzoates"],
  ["200-299", "220-229", "sulfites"],
  ["200-299", "230-239", "phenols and formates (methanoates)"],
  ["200-299", "240-259", "nitrates"],
  ["200-299", "260-269", "acetates (ethanoates)"],
  ["200-299", "270-279", "lactates"],
  ["200-299", "280-289", "propionates (propanoates)"],
  ["200-299", "290-299", "others"],
  ["300-399", "300-399", "Antioxidants and acidity regulators"],
  ["300-399", "300-305", "ascorbates (vitamin C)"],
  ["300-399", "306-309", "Tocopherol (vitamin E)"],
  ["300-399", "310-319", "gallates and erythorbates"],
  ["300-399", "320-329", "lactates"],
  ["300-399", "330-339", "citrates and tartrates"],
  ["300-399", "340-349", "phosphates"],
  ["300-399", "350-359", "malates and adipates"],
  ["300-399", "360-369", "succinates and fumarates"],
  ["300-399", "370-399", "others"],
  [
    "400-499",
    "400-499",
    "Thickeners, stabilisers and emulsifiers",
  ],
  ["400-499", "400-409", "alginates"],
  ["400-499", "410-419", "natural gums"],
  ["400-499", "420-429", "other natural agents"],
  ["400-499", "430-439", "polyoxyethene compounds"],
  ["400-499", "440-449", "natural emulsifiers"],
  ["400-499", "450-459", "phosphates"],
  ["400-499", "460-469", "cellulose compounds"],
  ["400-499", "470-489", "fatty acids and compounds"],
  ["400-499", "490-499", "others"],
  ["500-599", "500-599", "pH regulators and anti-caking agents"],
  ["500-599", "500-509", "mineral acids and bases"],
  ["500-599", "510-519", "chlorides and sulfates"],
  ["500-599", "520-529", "sulfates and hydroxides"],
  ["500-599", "530-549", "alkali metal compounds"],
  ["500-599", "550-559", "silicates"],
  ["500-599", "570-579", "stearates and gluconates"],
  ["500-599", "580-599", "others"],
  ["600-699", "600-699", "Flavour enhancers"],
  ["600-699", "620-629", "glutamates and guanylates"],
  ["600-699", "630-639", "inosinates"],
  ["600-699", "640-649", "others"],
  ["700-799", "700-799", "Antibiotics"],
  ["900-999", "900-999", "Glazing agents, gases and sweeteners"],
  ["900-999", "900-909", "waxes"],
  ["900-999", "910-919", "synthetic glazes"],



( run in 2.587 seconds using v1.01-cache-2.11-cpan-b16cb0d3907 )