[libcode-tidyall-perl] 188/374: make them Moo
Jonas Smedegaard
js at alioth.debian.org
Sun Sep 29 22:26:16 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 f998a834ca58cc71bfe1e00c4618fa81a2ff6a3c
Author: Jonathan Swartz <swartz at pobox.com>
Date: Thu Sep 6 11:14:27 2012 -0700
make them Moo
---
lib/Code/TidyAll/Test/Plugin/RepeatFoo.pm | 9 +++++----
lib/Code/TidyAll/Test/Plugin/ReverseFoo.pm | 5 ++---
lib/Code/TidyAll/Test/Plugin/UpperText.pm | 5 ++---
3 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/lib/Code/TidyAll/Test/Plugin/RepeatFoo.pm b/lib/Code/TidyAll/Test/Plugin/RepeatFoo.pm
index de79671..c73124e 100644
--- a/lib/Code/TidyAll/Test/Plugin/RepeatFoo.pm
+++ b/lib/Code/TidyAll/Test/Plugin/RepeatFoo.pm
@@ -1,12 +1,13 @@
package Code::TidyAll::Test::Plugin::RepeatFoo;
use Code::TidyAll::Util qw(read_file write_file);
-use base qw(Code::TidyAll::Plugin);
-use strict;
-use warnings;
+use Moo;
+extends 'Code::TidyAll::Plugin';
+
+has 'times' => ( is => 'ro' );
sub transform_source {
my ( $self, $source ) = @_;
- my $times = $self->options->{times} || die "no times specified";
+ my $times = $self->times || die "no times specified";
return $source x $times;
}
diff --git a/lib/Code/TidyAll/Test/Plugin/ReverseFoo.pm b/lib/Code/TidyAll/Test/Plugin/ReverseFoo.pm
index 8aa5abf..477deae 100644
--- a/lib/Code/TidyAll/Test/Plugin/ReverseFoo.pm
+++ b/lib/Code/TidyAll/Test/Plugin/ReverseFoo.pm
@@ -1,8 +1,7 @@
package Code::TidyAll::Test::Plugin::ReverseFoo;
use Code::TidyAll::Util qw(read_file write_file);
-use base qw(Code::TidyAll::Plugin);
-use strict;
-use warnings;
+use Moo;
+extends 'Code::TidyAll::Plugin';
sub transform_file {
my ( $self, $file ) = @_;
diff --git a/lib/Code/TidyAll/Test/Plugin/UpperText.pm b/lib/Code/TidyAll/Test/Plugin/UpperText.pm
index d0893d8..9acfa43 100644
--- a/lib/Code/TidyAll/Test/Plugin/UpperText.pm
+++ b/lib/Code/TidyAll/Test/Plugin/UpperText.pm
@@ -1,7 +1,6 @@
package Code::TidyAll::Test::Plugin::UpperText;
-use base qw(Code::TidyAll::Plugin);
-use strict;
-use warnings;
+use Moo;
+extends 'Code::TidyAll::Plugin';
sub transform_source {
my ( $self, $source ) = @_;
--
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