summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Rothenberg <rrwo@cpan.org>2020-03-25 13:03:08 +0000
committerRobert Rothenberg <rrwo@cpan.org>2020-03-25 13:03:08 +0000
commita59820e342b142b9a12c1369a534e3dceaa50bcf (patch)
tree1305d0240f8cfa897313241f59309bc71f7f653f
parent828b55130d96d7266eb761353e9710eda6f6d0ca (diff)
Actually use system getloadavg for NetBSD and Solaris
-rw-r--r--Changes2
-rw-r--r--lib/Sys/CpuLoad.pm2
2 files changed, 3 insertions, 1 deletions
diff --git a/Changes b/Changes
index 0f6ebd8..df86d40 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,8 @@
Revision history for Perl extension {{$dist->name}}:
{{$NEXT}}
+ [Bug Fixes]
+ - Actually use system getloadavg for NetBSD and Solaris.
0.20 2020-03-25 12:35:33+00:00 Europe/London
[Enhancements]
diff --git a/lib/Sys/CpuLoad.pm b/lib/Sys/CpuLoad.pm
index ef258ba..cbe384e 100644
--- a/lib/Sys/CpuLoad.pm
+++ b/lib/Sys/CpuLoad.pm
@@ -54,7 +54,7 @@ sub BEGIN {
my $this = __PACKAGE__;
my $os = lc $^O;
- if ( $os =~ /^(darwin|freebsd|openbsd|linux)$/ ) {
+ if ( $os =~ /^(darwin|(free|net|open)bsd|linux|solaris|sunos)$/ ) {
no strict 'refs'; ## no critic (ProhibitNoStrict)