NAME
Net::SixXS::Diag::MainDebug
- relay diagnostic messages to a debug() routine
SYNOPSIS
package main;
use Net::SixXS;
use Net::SixXS::Diag::MainDebug;
Net::SixXS::diag(Net::SixXS::Diag::MainDebug->new());
my $verbose;
sub debug($) {
say STDERR "Diag: $_[1]" if $verbose;
}
DESCRIPTION
The Net::SixXS::Diag::MainDebug
class implements the Net::SixXS::Diag role by passing all messages to a method named debug()
in the main
package, thus allowing the main program to decide whether and how to display any diagnostic messages.
METHODS
The Net::SixXS::Diag::MainDebug
class implements the Net::SixXS::Diag role by supplying a single method named debug()
that forwards the message to the main program's debug()
routine as described above.
SEE ALSO
Net::SixXS::Diag, Net::SixXS::Diag::None
LICENSE
Copyright (C) 2015 Peter Pentchev <roam@ringlet.net>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
Peter Pentchev <roam@ringlet.net>