Food::ECodes - Interface to Food Additive ECodes.
Version 0.08
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.
Return 1/0 depending whether the given Ecode is VALID or INVALID.
use strict; use warnings; use Food::ECodes; my $food = Food::ECodes->new(); print "E100 is a valid ECode.\n" if $food->is_valid('E100');
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 E100: [$status].\n";
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 E100: [$name].\n";
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 E100: [$purpose].\n";
Return 1/0 depending whether the given Ecode is approved in EU.
use strict; use warnings; use Food::ECodes; my $food = Food::ECodes->new(); print "E100 is EU approved code.\n" if $food->is_eu_approved('E100');
Return 1/0 depending whether the given Ecode is approved in US.
use strict; use warnings; use Food::ECodes; my $food = Food::ECodes->new(); print "E100 is US approved code.\n" if $food->is_us_approved('E100');
Return 1/0 depending whether the given Ecode is VEGETARIAN or NOT.
use strict; use warnings; use Food::ECodes; my $food = Food::ECodes->new(); print "E100 is VEGETARIAN.\n" if $food->is_vegetarian('E100'); print "E120 is NON-VEGETARIAN.\n" unless $food->is_vegetarian('E120');
Mohammad S Anwar, <mohammad.anwar at yahoo.com>
<mohammad.anwar at yahoo.com>
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.
bug-food-ecodes at rt.cpan.org
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
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Food-ECodes
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Food-ECodes
CPAN Ratings
http://cpanratings.perl.org/d/Food-ECodes
Search CPAN
http://search.cpan.org/dist/Food-ECodes/
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.
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.
To install Food::ECodes, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Food::ECodes
CPAN shell
perl -MCPAN -e shell install Food::ECodes
For more information on module installation, please visit the detailed CPAN module installation guide.