Mnet::Log::Conditional - Use Mnet::Log if Mnet::Log is loaded
use Mnet::Log::Conditional qw( DEBUG INFO WARN FATAL ); # nothing will happen unless Mnet::Log was loaded INFO("starting"); # errors will still always go to stderr WARN("error"); FATAL("abort"); my $log = Mnet::Log::Conditional->new($opts); $log->DEBUG("object oriented interace");
This module can be called to output log entries using the Mnet::Log module, but only if the Mnet::Log module has already been loaded.
Refer to perldoc Mnet::Log for more information.
$log = Mnet::Log::Conditional->new(\%opts)
This class method creates a new Mnet::Log::Conditional object. The opts hash ref argument is not requried but may be used to override any parsed cli options parsed with the Mnet::Opts::Cli module.
The returned object may be used to call other documented functions and methods in this module, which will call the Mnet::Log module if it is loaded.
Refer to the new method in perldoc Mnet::Log for more information.
$log->debug($text)
Method to output a debug entry using the Mnet::Log module, if it is loaed. If the Mnet::Log module is not loaded then nothing happens.
$log->info($text)
Method to output an info entry using the Mnet::Log module, if it is loaed. If the Mnet::Log module is not loaded then nothing happens.
$log->warn($text)
Method to output a warn entry using the Mnet::Log module, if it is loaed. If the Mnet::Log module is not loaded then the perl warn command is called.
$log->fatal($text)
Method to output a fatal entry using the Mnet::Log module, if it is loaded. If the Mnet::Log module is not loaded then the perl die command is called.
DEBUG($text)
Function to output a debug entry using the Mnet::Log module, if it is loaed. If the Mnet::Log module is not loaded then nothing happens.
INFO($text)
Function to output an info entry using the Mnet::Log module, if it is loaed. If the Mnet::Log module is not loaded then nothing happens.
WARN($text)
Function to output a debug entry using the Mnet::Log module, if it is loaed. If the Mnet::Log module is not loaded then the perl warn command is called.
FATAL($text)
Function to output a debug entry using the Mnet::Log module, if it is loaed. If the Mnet::Log module is not loaded then the perl die command is called.
Mnet
Mnet::Opts::Cli::Cache
To install Mnet, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mnet
CPAN shell
perl -MCPAN -e shell install Mnet
For more information on module installation, please visit the detailed CPAN module installation guide.