FAQ-OMatic

 view release on metacpan or  search on metacpan

lib/FAQ/OMatic.pm  view on Meta::CPAN

sub checkLoadAverage {
	if (1) {
		# this cobbled feature has no install-page hook; turn it off for now.
		return;
	}
	my $uptime = `uptime`;
	$uptime =~ m/load average: ([\d\.]+)/;
	my $load = $1;
	if ($load > 4) {
		FAQ::OMatic::gripe('abort',
			"I'm too busy for that now. (I'm kind of a crummy PC.)");
	}
}

# Return the integer prefix to this string, or 0.
# Used to fix "argument isn't numeric" warnings.
sub stripInt {
	my $str = shift;
	if (not defined $str) {
		return 0;
	}



( run in 0.295 second using v1.01-cache-2.11-cpan-87723dcf8b7 )