This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag release-0.002
in repository libmoox-role-logger-perl.

commit cb3dfe608cd7ed5a61ef845d480ede8cac58eb17
Author: David Golden <dagol...@cpan.org>
Date:   Fri Jan 24 16:49:32 2014 -0500

    rename logger method to _logger
---
 Changes                   | 5 +++++
 lib/MooseX/Role/Logger.pm | 8 ++++----
 t/basic.t                 | 2 +-
 t/lib/MyModule.pm         | 2 +-
 4 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/Changes b/Changes
index bc01ac7..2838248 100644
--- a/Changes
+++ b/Changes
@@ -2,6 +2,11 @@ Revision history for MooseX-Role-Logger
 
 {{$NEXT}}
 
+    [Incompatible Change]
+
+    - The role now provides private method '_logger' rather than
+      public method 'logger' (thanks, mst)
+
 0.001     2013-10-03 00:24:33 America/New_York
 
     - First release
diff --git a/lib/MooseX/Role/Logger.pm b/lib/MooseX/Role/Logger.pm
index b8b4f6a..3cb9775 100644
--- a/lib/MooseX/Role/Logger.pm
+++ b/lib/MooseX/Role/Logger.pm
@@ -11,19 +11,19 @@ use Types::Standard qw/Str/;
 
 use Log::Any ();
 
-=method logger
+=method _logger
 
 Returns a logging object.  See L<Log::Any> for a list of logging methods it 
accepts.
 
 =cut
 
-has logger => (
+has _logger => (
     is       => 'lazy',
     isa      => sub { ref( $_[0] ) =~ /^Log::Any/ }, # XXX too many options
     init_arg => undef,
 );
 
-sub _build_logger {
+sub _build__logger {
     my ($self) = @_;
     return Log::Any->get_logger( category => $self->_logger_category );
 }
@@ -62,7 +62,7 @@ In your modules:
 
     sub cry {
         my ($self) = @_;
-        $self->logger->info("I'm sad");
+        $self->_logger->info("I'm sad");
     }
 
 In your application:
diff --git a/t/basic.t b/t/basic.t
index ef7c37b..eb3cf35 100644
--- a/t/basic.t
+++ b/t/basic.t
@@ -13,7 +13,7 @@ use MyModule;
 
 my $obj = new_ok('MyModule');
 
-my $log_class = ref $obj->logger;
+my $log_class = ref $obj->_logger;
 like( $log_class, qr/^Log::Any/, "logger came is from Log::Any" );
 
 $obj->cry;
diff --git a/t/lib/MyModule.pm b/t/lib/MyModule.pm
index 2c132e9..e6af2e3 100644
--- a/t/lib/MyModule.pm
+++ b/t/lib/MyModule.pm
@@ -14,7 +14,7 @@ sub run {
 
 sub cry {
     my ($self) = @_;
-    $self->logger->info("I'm sad");
+    $self->_logger->info("I'm sad");
 }
 
 1;

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libmoox-role-logger-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to