[Saute-develop] Code Split II
Status: Alpha
Brought to you by:
heiseltc
|
From: Olivier.Roch-Vilato <Oli...@wa...> - 2001-09-07 00:13:57
|
I've followed the answer to your question in Perl Monks and did a sauteDB.pm (I will add comments) module which is an interface = betwen saute.pl and MySQL For the rest of the code i'm still wondering, i'm thinking of a UI module which deals with all windows but don't know = yet how to implement it What's your opinion ? A+ Olivier CHANGES ------------- Modify saute.pl to work with sauteDB.pm=20 sauteDB.pm public methods : new : to create a new instance getCategories : retreive categories list hasCategory : is 'category' in database ? addCategory : add 'category' to database if not there delCategory : remove 'category' from database getIngredients : retreive ingredients list hasIngredient : is 'ingredient' in database ? addIngredient : add 'ingredient' to database if not there delIngredient : remove 'ingredient' from database getUnits : retreive units (measures) list hasUnit : is 'unit' in database ? addUnit : add 'unit' to database if not there delUnit : remove 'unit' from database getCategoryRecipes : get IDs of all recipes which are in 'category' getRecipes : get IDs of all recipes getRecipe : get a recipe (ex get_recipe_info) addRecipe : save / update a recipe (ex save_recipe) delRecipe : remove a recipe from the database=20 searchRecipes : search recipes (ex search_function) |