[libcode-tidyall-perl] 113/374: convert to Moo

Jonas Smedegaard js at alioth.debian.org
Sun Sep 29 22:25:59 UTC 2013


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

js pushed a commit to branch master
in repository libcode-tidyall-perl.

commit 56de739d3b403108729b8060dda5fe5b6e70f14b
Author: Jonathan Swartz <swartz at pobox.com>
Date:   Tue Jul 24 13:50:52 2012 -0700

    convert to Moo
---
 lib/Code/TidyAll/Cache.pm |   13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/lib/Code/TidyAll/Cache.pm b/lib/Code/TidyAll/Cache.pm
index 540c4bf..3ae99e0 100644
--- a/lib/Code/TidyAll/Cache.pm
+++ b/lib/Code/TidyAll/Cache.pm
@@ -1,16 +1,9 @@
 package Code::TidyAll::Cache;
-use Object::Tiny qw(cache_dir);
 use Digest::SHA1 qw(sha1_hex);
 use Code::TidyAll::Util qw(dirname mkpath read_file write_file);
-use strict;
-use warnings;
-
-sub new {
-    my $class = shift;
-    my $self  = $class->SUPER::new(@_);
-    die "cache_dir required" unless $self->{cache_dir};
-    return $self;
-}
+use Moo;
+
+has 'cache_dir' => ( is => 'ro', required => 1 );
 
 sub path_to_key {
     my ( $self, $key ) = @_;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libcode-tidyall-perl.git



More information about the Pkg-perl-cvs-commits mailing list