summaryrefslogtreecommitdiff
path: root/Makefile.PL
diff options
context:
space:
mode:
authorShlomi Fish <shlomif@shlomifish.org>2017-05-12 19:49:22 +0300
committerShlomi Fish <shlomif@shlomifish.org>2017-05-12 19:49:22 +0300
commit1776149d9c8e1040c66a7f28bedabcb3fbb3b688 (patch)
tree0ba096ce9df37a315c8e47959c33dc8058e56ee8 /Makefile.PL
parent4af14931b358ffbc1ce8fd572ac56a632e744c73 (diff)
Cleanups / modernisations to Makefile.PL.
1. strict+warnings. 2. Explicit returns. 3. Trailing semicolons. 4. No ampersand in subroutine calls. See http://perl-begin.org/tutorials/bad-elements/ .
Diffstat (limited to 'Makefile.PL')
-rw-r--r--Makefile.PL14
1 files changed, 8 insertions, 6 deletions
diff --git a/Makefile.PL b/Makefile.PL
index a953303..f34148f 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,3 +1,5 @@
+use strict;
+use warnings;
use ExtUtils::MakeMaker;
use Carp;
@@ -7,7 +9,7 @@ if ( $mm_version < 6.58 ) {
croak("Sorry, but MakeMaker 6.58 or better is needed to build this package.");
}
-&WriteMakefile(
+WriteMakefile(
NAME => 'Term::ReadKey',
DISTNAME => 'TermReadKey',
LICENSE => 'perl',
@@ -69,7 +71,7 @@ distcc: genchars.pl
ReadKey.c: cchars.h
";
- $_
+ return $_;
}
# The template needs DynaLoader. don't use miniperl (dual-life only)
@@ -78,18 +80,18 @@ sub MY::processPL {
$_ = $self->MM::processPL();
s/ReadKey.pm :: ReadKey_pm.PL/ReadKey.pm :: ReadKey_pm.PL dynamic/;
s/\$\(PERLRUN\)/\$(FULLPERLRUNINST)/;
- $_
+ return $_;
}
sub MY::test {
my $self = shift;
$_ = $self->MM::test();
s#example/test.pl#-w example/test.pl#;
- $_
+ return $_;
}
sub MY::test_interactive {
- "Fooo"
+ return "Fooo";
}
sub MY::pure_site_install {
@@ -97,5 +99,5 @@ sub MY::pure_site_install {
my $new = $self->MM::test();
$new .= "\n\t./register_module Term::ReadKey";
- $new
+ return $new;
}