Mohammad S Anwar > Food-ECodes-0.08 > Food::ECodes

Download:
Food-ECodes-0.08.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.08   Source  

NAME ^

Food::ECodes - Interface to Food Additive ECodes.

VERSION ^

Version 0.08

DESCRIPTION ^

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();
    print "E100 is a valid ECode.\n" if $food->is_valid('E100');

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 E100: [$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 E100: [$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 E100: [$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();
    print "E100 is EU approved code.\n" if $food->is_eu_approved('E100');

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();
    print "E100 is US approved code.\n" if $food->is_us_approved('E100');

is_vegetarian()

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');

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:

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.

syntax highlighting: