Acme-FishFarm
view release on metacpan or search on metacpan
lib/Acme/FishFarm/Feeder.pm view on Meta::CPAN
if ( not $options{food_tank_capacity} ) {
$options{food_tank_capacity} = 500;
}
if ( not $options{current_food_amount} ) {
$options{current_food_amount} = $options{food_tank_capacity};
}
$options{first_usage} = 1; # make sure the feeder doesn't say timer is up as soon as it is switched on
bless \%options, $class;
}
=head1 TIMER RELATED SUBROUTINES/METHODS
=head2 get_timer
Returns the timer threshold of the feeder.
lib/Acme/FishFarm/OxygenMaintainer.pm view on Meta::CPAN
if ( not $options{DO_threshold} ) {
$options{DO_threshold} = 5;
}
if ( not $options{DO_generation_volume} ) {
$options{DO_generation_volume} = 0.2;
}
$options{is_DO_low} = 0; # might be useless :)
bless \%options, "Acme::FishFarm::OxygenMaintainer";
}
=head1 DISSOLVED OXYGEN SENSOR RELATED METHODS
=head2 current_DO ( $new_DO )
Sets / returns the current DO level of the water.
C<$new_DO> is optional. If present, the current DO will be set to C<$new_DO>. Otherwise, returns the current DO reading.
lib/Acme/FishFarm/WaterConditionMonitor.pm view on Meta::CPAN
$sensors{turbidity_LED_on} = 0;
}
# low DO led, use Acme::FishFarm::OxygenMaintainer to determine
$sensors{DO_LED_on} = 0;
$sensors{lighted_LED_count} = 0;
$sensors{short_buzzer_on} = 0;
$sensors{long_buzzer_on} = 0;
bless \%sensors, "Acme::FishFarm::WaterConditionMonitor";
}
=head2 add_oxygen_maintainer ( $oxygen_maintainer )
Connects the oxygen maintainer ie C<Acme::FishFarm::OxygenMaintainer> system to this monitoring system.
For now, this module can only check if the oxygen is lacking or not. This module contains a user friendly method compared to the standard terminology used in the C<Acme::FishFarm::OxygenMaintainer> module. Other user friendly methods will be added in...
=cut
lib/Acme/FishFarm/WaterFiltration.pm view on Meta::CPAN
$options{current_waste_count} = 0;
}
if ( not $options{waste_threshold} ) {
$options{waste_threshold} = 75;
}
$options{is_on_spatulas} = 0;
$options{reduce_waste_count_by} = 10;
bless \%options, "Acme::FishFarm::WaterFiltration";
}
=head1 WASTE LEVEL DETECTING SUBROUTINES/METHODS
=head2 current_waste_count ( $new_waste_count )
Sets / returns the current waste count inside the cylinder.
C<$new_waste_count> is optional. If present, the current waste count will be set to C<$new_waste_count>. Otherwise, returns the current waste count.
lib/Acme/FishFarm/WaterLevelMaintainer.pm view on Meta::CPAN
if ( not $options{low_water_level_threshold} ) {
$options{low_water_level_threshold} = 2;
}
if ( not $options{increase_water_level_by} ) {
$options{increase_water_level_by} = 0.5;
}
$options{is_low_water_level} = 0; # might be useless :)
bless \%options, "Acme::FishFarm::WaterLevelMaintainer";
}
=head1 WATER LEVEL DETECTION RELATED METHODS
=head2 current_water_level ( $new_water_level )
Sets / returns the current water level of the water.
C<$new_water_level> is optional. If present, the current water level will be set to C<$new_water_level>. Otherwise, returns the current water level (depth).
( run in 1.165 second using v1.01-cache-2.11-cpan-de7293f3b23 )