NAME
Food::ECodes - Interface to Food Additive ECodes.
VERSION
Version 0.03
SYNOPSIS
E numbers are number codes for food additives that have been assessed for use within the European Union (the "E" prefix stands for "Europe"). They are commonly found on food labels throughout the European Union. Safety assessment and approval are the responsibility of the European Food Safety Authority.
The numbering scheme follows that of the International Numbering System (INS) as determined by the Codex Alimentarius committee though only a subset of the INS additives are approved for use in the European Union. E numbers are also encountered on food labelling in other jurisdictions, including the Cooperation Council for the Arab States of the Gulf, Australia, New Zealand and Israel. The "E" prefix is omitted in Australia and New Zealand. They are increasingly, though rarely, found on North American packaging, especially in Canada on imported European products.
METHODS
is_valid()
Return 1/0 depending whether the given Ecode is VALID or INVALID.
use strict; use warnings;
use Food::ECodes;
my $food = Food::ECodes->new();
($food->is_valid('E100'))
?
(print "VALID ECode [$code].\n")
:
(print "INVALID ECode [$code].\n");
get_status()
Return status of the given Ecode. Possible values are HALAL, HARAM or SUSPECTED. Returns N/A if the code doesn't have status in our record.
use strict; use warnings;
use Food::ECodes;
my $food = Food::ECodes->new();
my $status = $food->get_status('E100');
print "Status for ECode E101: [$status].\n";
get_name()
Return the name of the given Ecode, if exists, otherwise croaks.
use strict; use warnings;
use Food::ECodes;
my $food = Food::ECodes->new();
my $name = $food->get_name('E100');
print "Name for ECode E101: [$name].\n";
get_purpose()
Return the purpose of the given Ecode, if exists.
use strict; use warnings;
use Food::ECodes;
my $food = Food::ECodes->new();
my $purpose = $food->get_purpose('E100');
print "Purpose for ECode E101: [$purpose].\n";
is_eu_approved()
Return 1/0 depending whether the given Ecode is approved in EU.
use strict; use warnings;
use Food::ECodes;
my $food = Food::ECodes->new();
($food->is_eu_approved('E100'))
?
(print "EU approved ECode [$code].\n")
:
(print "EU unapproved ECode [$code].\n");
is_us_approved()
Return 1/0 depending whether the given Ecode is approved in US.
use strict; use warnings;
use Food::ECodes;
my $food = Food::ECodes->new();
($food->is_us_approved('E100'))
?
(print "US approved ECode [$code].\n")
:
(print "US unapproved ECode [$code].\n");
AUTHOR
Mohammad S Anwar, <mohammad.anwar at yahoo.com>
BUGS
Please report any bugs or feature requests to bug-food-ecodes at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Food-ECodes. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Food::ECodes
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
LICENSE AND COPYRIGHT
Copyright 2011 Mohammad S Anwar.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
DISCLAIMER
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.