Acme-FishFarm
view release on metacpan or search on metacpan
docs/specifications view on Meta::CPAN
Specification for Acme::FishFarm v1.01
Only allow installation of a system once, however, make it changable
1. Acme::FishFarming will contain the five main systems functions
-Maybe sub them into individual class, so this class will just contain some general
subroutines to access the sub-classes
2. Acme::FishFarm will contain these subroutines for X system
-install_X() : instantiate Acme::FishFarm::X
-install_all_systems(): installs all the Acme::FishFarm::* systems
-check_X() : return values of sensors or whatever for system X
-all_systems_report() : returns a hash of all the systems with corresponding sensor
values
2.1 Acme::FishFarm::WaterLevelMaintainer
2.2 Acme::FishFarm::Feeder
2.3 Acme::FishFarm::WaterFiltration
2.4 Acme::FishFarm::WaterConditionMonitor
2.5 Acme::FishFarm::OxygenMaintainer
2.6 A few systems has some mechanism that can't work by itself and require explicit action, these include:
- Acme::FishFarm::Feeder
* timer needs to be ticked from time to time
- Acme::FishFarm::OxygenMaintainer
* oxygen needs to be generated constantly if DO is lower than threshold
- Acme::FishFarm::WaterLevelMaintainer
* water needs to be pumped constantly if water level is lower than threshold
There's really no obvious reason why this is so, it's just what and how I want the method names to be :)
3. Actual script:
3.1 Use YAML as config file, this file will be read every t seconds and the
program will react accordingly to the new data
3.2 Use lib so that the modules can be moved together with the scripts
-Compile the script into an executable just in case
3.3 There will be a loop to make everything work, this is a full program
3.4 Implement randomness here and there if possible
( run in 1.324 second using v1.01-cache-2.11-cpan-39bf76dae61 )