NAME
Net::Prometheus::ProcessCollector
- obtain a process collector for the OS
SYNOPSIS
use Net::Prometheus::ProcessCollector;
my $collector = Net::Prometheus::ProcessCollector->new;
DESCRIPTION
This module-loading package provides a method that attempts to load a process collector appropriate for the host OS it is running on.
The following OS-specific modules are provided with this distribution:
Other OSes may be supported by 3rd-party CPAN modules by following this naming pattern based on the value of the $^O
variable on the OS concerned.
MAGIC CONSTRUCTORS
new
$collector = Net::Prometheus::ProcessCollector->new( @args )
Attempts to construct a new process collector for the OS named by $^O
, passing in any extra arguments into the new
constructor for the specific class.
If no perl module is found under the appropriate file name, undef
is returned. If any other error occurs while loading or constructing the instance, the exception is thrown as normal.
for_OS
$collector = Net::Prometheus::ProcessCollector->for_OS( $os, @args )
Attempts to construct a new process collector for the named OS. Except under especially-exceptional circumstances, you don't want to call this method. Call "new" instead.