Log::Dump::Class
prepare your logger class:
package YourApp::Log; use Log::Dump::Class;
and use it in your application classes:
package YourApp::ClassA; use YourApp::Log; package YourApp::ClassB; use YourApp::Log;
now if you enable/disable your logger in some class, all the classes will be affected by that change.
# this enables YourApp::ClassB's logger, too YourApp::ClassA->logger(1);
You usually want to use this for a larger application, as this allows you to enable/disable a logger application-wide easily (not per a class). See SYNOPSIS for usage, and Log::Dump for available methods.
Note that Log::Dump::Class-based class stores its status in the class, not in an object that actually uses it (even if you call its methods from the object).
Kenichi Ishigaki, <ishigaki@cpan.org>
Copyright (C) 2009 by Kenichi Ishigaki.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Log::Dump, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Log::Dump
CPAN shell
perl -MCPAN -e shell install Log::Dump
For more information on module installation, please visit the detailed CPAN module installation guide.