-
Notifications
You must be signed in to change notification settings - Fork 0
cobber/Notifications
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Notifications version 0.01
==========================
Notifications provides a way for individual module authors to provide useful
information to applications without creating unnecessary dependencies.
Module authors simply create notifications:
package MyModule;
use Notifications qw( start note finish );
start( "I just started" );
note( "froobing the doble" );
finish( "all done" );
Application authors can pick up these messages by creating typical logging
objects or specialised notification observers which capture the notifications
and pass them on to their final destinations:
#!/usr/bin/perl
use Log::Log4Perl;
use Log::Dispatch;
use Notifications::Observer::Log4Perl;
use Notifications::Observer::LogDispatch;
use MyModule;
my $log_d_derl = Notifications::Observer::Log4Perl->new( log => Log::Log4Perl->new( ... ) );
my $log_dispatch = Notifications::Observer::LogDispatch->new( log => Log::LogDispatch->new( ... ) );
$log_d_derl->start();
$log_dispatch->start();
...; # start doing stuff with MyModule
INSTALLATION
To install this module type the following:
perl Makefile.PL
make
make test
make install
DEPENDENCIES
none, that's why I wrote this module :-)
COPYRIGHT AND LICENCE
Put the correct copyright and licence information here.
Copyright (C) 2011 by Stephen Riehm
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.10.1 or,
at your option, any later version of Perl 5 you may have available.
About
CPAN module for globally handling all kinds of notifications
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published