From: Arthur Axel 'fREW' Schmidt Date: Sat, 13 Feb 2010 21:57:35 +0000 (-0600) Subject: export stuff and see if it works (it does!) X-Git-Tag: v0.00100~37 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2033c911d249cbd91248eb2b8335fd8dff377307;p=p5sagit%2FLog-Contextual.git export stuff and see if it works (it does!) --- diff --git a/lib/Log/Contextual.pm b/lib/Log/Contextual.pm index adfca1a..165096d 100644 --- a/lib/Log/Contextual.pm +++ b/lib/Log/Contextual.pm @@ -1,5 +1,15 @@ package Log::Contextual; +use 5.006; + +$VERSION = '1.000'; + +require Exporter; + +BEGIN { @ISA = qw(Exporter) } + +@EXPORT = qw(set_logger log_debug with_logger); + our $Get_Logger; sub set_logger { diff --git a/t/log.t b/t/log.t index 948f6e1..9bb5b29 100644 --- a/t/log.t +++ b/t/log.t @@ -3,5 +3,16 @@ use warnings; use Log::Contextual; use Test::More qw(no_plan); +my $logger = sub { WarnLogger->new }; +set_logger($logger); +log_debug { 'frew!' }; + + +BEGIN { + package WarnLogger; + sub debug { warn $_[1] } + sub is_debug { 1 } + sub new { bless {}, __PACKAGE__ } +}