Acme-FishFarm
view release on metacpan or search on metacpan
docs/Acme-FishFarm-WaterFiltration-1.01.html view on Meta::CPAN
<body>
<ul id="index">
<li><a href="#NAME">NAME</a></li>
<li><a href="#VERSION">VERSION</a></li>
<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
<li><a href="#EXPORT">EXPORT</a></li>
<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
<li><a href="#CREATION-SUBROUTINES-METHODS">CREATION SUBROUTINES/METHODS</a>
<ul>
<li><a href="#install-options">install ( %options )</a></li>
</ul>
</li>
<li><a href="#WASTE-LEVEL-DETECTING-SUBROUTINES-METHODS">WASTE LEVEL DETECTING SUBROUTINES/METHODS</a>
<ul>
<li><a href="#current_waste_count-new_waste_count">current_waste_count ( $new_waste_count )</a></li>
<li><a href="#waste_count_threshold">waste_count_threshold</a></li>
<li><a href="#set_waste_count_threshold">set_waste_count_threshold</a></li>
<li><a href="#reduce_waste_count_by1">reduce_waste_count_by</a></li>
<li><a href="#set_waste_count_to_reduce-new_count">set_waste_count_to_reduce ( $new_count )</a></li>
<li><a href="#is_filter_layer_dirty">is_filter_layer_dirty</a></li>
<li><a href="#is_cylinder_dirty">is_cylinder_dirty</a></li>
</ul>
</li>
<li><a href="#CLEANING-RELATED-SUBROUTINES-METHODS">CLEANING RELATED SUBROUTINES/METHODS</a>
<ul>
<li><a href="#clean_filter_layer">clean_filter_layer</a></li>
<li><a href="#clean_cylinder-reduce_waste_by">clean_cylinder ( $reduce_waste_by )</a></li>
<li><a href="#turn_on_spatulas">turn_on_spatulas</a></li>
<li><a href="#turn_off_spatulas">turn_off_spatulas</a></li>
<li><a href="#is_on_spatulas">is_on_spatulas</a></li>
</ul>
</li>
<li><a href="#AUTHOR">AUTHOR</a></li>
<li><a href="#BUGS">BUGS</a></li>
<li><a href="#SUPPORT">SUPPORT</a></li>
<li><a href="#ACKNOWLEDGEMENTS">ACKNOWLEDGEMENTS</a></li>
<li><a href="#LICENSE-AND-COPYRIGHT">LICENSE AND COPYRIGHT</a></li>
</ul>
<h1 id="NAME">NAME</h1>
<p>Acme::FishFarm::WaterFiltration - Water Filter for Acme::FishFarm</p>
<h1 id="VERSION">VERSION</h1>
<p>Version 1.01</p>
<h1 id="SYNOPSIS">SYNOPSIS</h1>
<pre><code> use 5.010;
use Acme::FishFarm qw( reduce_precision );
use Acme::FishFarm::WaterFiltration;
my $water_filter = Acme::FishFarm::WaterFiltration->install;
say "Water filter installed and switched on!\n";
my $current_reading;
my $waste_count_threshold;
while ( "Fish are living under the water..." ) {
$water_filter->current_waste_count( reduce_precision ( rand(100) ) );
$current_reading = $water_filter->current_waste_count;
$waste_threshold = $water_filter->waste_count_threshold;
print "Current Waste Count: ", $current_reading, " (high: >= ", $waste_threshold, ")\n";
if ( $water_filter->is_cylinder_dirty ) {
print " !! Filtering cylinder is dirty!\n";
print " Cleaned the filter!\n";
$water_filter->clean_cylinder;
} else {
print " Filtering cylinder is still clean.\n";
}
sleep(1);
say "";
}</code></pre>
<h1 id="EXPORT">EXPORT</h1>
<p>None</p>
<h1 id="DESCRIPTION">DESCRIPTION</h1>
<p>This module assumes a cool water filter with a filtering cylinder constantly filtering water in the tank. It has inlet, outlet and a drainage valves. The drainage valve is only opened when the cleaners are switched on automatically to remove waste...
<p>This feature is based on the water filter found <a href="https://www.filternox.com/filters/spt-wbv-mr/">here</a></p>
<h1 id="CREATION-SUBROUTINES-METHODS">CREATION SUBROUTINES/METHODS</h1>
<h2 id="install-options">install ( %options )</h2>
<p>Installs a cool water filtration system.</p>
<p>The following are avaiable for <code>%options</code>:</p>
<dl>
<dt id="current_waste_count">current_waste_count</dt>
<dd>
<p>The current waste count in the cylinder. Default is <code>0</code>.</p>
</dd>
<dt id="waste_threshold">waste_threshold</dt>
<dd>
<p>Default value is <code>75</code>.</p>
<p>Sets the waste treshold.</p>
<p>This is the maximum limit of waste in the cylinder. When this count is hit, it will turn on the cleaners / spatulas or whatever it's called :).</p>
</dd>
<dt id="reduce_waste_count_by">reduce_waste_count_by</dt>
<dd>
<p>Default is <code>10</code>.</p>
<p>The amount of waste to remove from the cylinder / filter each time the cleaning process is called.</p>
</dd>
</dl>
<h1 id="WASTE-LEVEL-DETECTING-SUBROUTINES-METHODS">WASTE LEVEL DETECTING SUBROUTINES/METHODS</h1>
<h2 id="current_waste_count-new_waste_count">current_waste_count ( $new_waste_count )</h2>
<p>Sets / returns the current waste count inside the cylinder.</p>
<p><code>$new_waste_count</code> is optional. If present, the current waste count will be set to <code>$new_waste_count</code>. Otherwise, returns the current waste count.</p>
<h2 id="waste_count_threshold">waste_count_threshold</h2>
<p>Returns the waste count threshold.</p>
( run in 0.633 second using v1.01-cache-2.11-cpan-5511b514fd6 )