--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.perlcriticrc Sun Sep 01 12:59:13 2013 +0200
@@ -0,0 +1,7 @@
+severity = 2
+top = 50
+verbose = 9
+
+[-Perl::Critic::Policy::Miscellanea::ProhibitUnrestrictedNoCritic]
+[ControlStructures::ProhibitPostfixControls]
+allow = if
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.vim/compiler/perlcritic.vim Sun Sep 01 12:59:13 2013 +0200
@@ -0,0 +1,22 @@
+" Vim Compiler File
+" Compiler: perlcritic
+" Maintainer: Scott Peshak <speshak@gmail.com>
+" Last Change: 2006 Dec 19
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "perlcritic"
+
+if exists(":CompilerSet") != 2
+ command -nargs=* CompilerSet setlocal <args>
+endif
+
+let s:cpo_save = &cpo
+set cpo-=C
+
+CompilerSet makeprg=perlcritic\ -verbose\ 1\ -2\ %
+CompilerSet errorformat=%f:%l:%c:%m
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
--- a/.vim/ftplugin/perl_hs12.vim Sun Sep 01 12:13:15 2013 +0200
+++ b/.vim/ftplugin/perl_hs12.vim Sun Sep 01 12:59:13 2013 +0200
@@ -36,4 +36,6 @@
:!perldoc %
endfunc
+:compiler perlcritic
+
" vim:ft=vim:
--- a/install Sun Sep 01 12:13:15 2013 +0200
+++ b/install Sun Sep 01 12:59:13 2013 +0200
@@ -7,41 +7,48 @@
use Sys::Hostname;
use autodie;
use Getopt::Long;
+use English qw(-no_match_vars);
+
+our $VERSION = '0.0';
my $opt_force = 0;
GetOptions('f|force!' => \$opt_force)
- or die "Usage: $0 [--force]\n";
+ or die "Usage: $PROGRAM_NAME [--force]\n";
# list of files/dirs to exclude
-my @exclude = map { qr/$_/ } qw(
- ^\.\.?$
- ^\.hg$
-), basename $0;
+
+my @exclude = map { qr/$_/xms } qw(
+ ^\.\.?$
+ ^\.hg$
+ ), basename $PROGRAM_NAME;
... if $opt_force;
-foreach my $this (grep { not $_ ~~ @exclude } glob('.*')) {
+foreach my $this (grep { not $_ ~~ @exclude } glob q{.*}) {
my $link = catfile $ENV{HOME}, $this;
given ($link) {
- when (not -e) {
- { no autodie; unlink $link } # may be necessary if it's a broken symlink
- symlink abs2rel($this, $ENV{HOME}) => $link;
- say "$link linked";
- next;
- }
- when(not -l) {
- warn "$link is not a link, skipping\n";
- next;
- }
- when(-l) {
- my $dst = rel2abs(readlink, $ENV{HOME});
- next if $dst eq rel2abs($this);
- warn "$link is a link to $dst, skipping\n";
- next;
- }
- default { ... }
+ when (not -e) {
+ {
+ no autodie;
+ unlink $link
+ } # may be necessary if it's a broken symlink
+ symlink abs2rel($this, $ENV{HOME}) => $link;
+ say "$link linked"; ## no critic
+ next;
+ }
+ when (not -l) {
+ warn "$link is not a link, skipping\n";
+ next;
+ }
+ when (-l) {
+ my $dst = rel2abs(readlink, $ENV{HOME});
+ next if $dst eq rel2abs($this);
+ warn "$link is a link to $dst, skipping\n";
+ next;
+ }
+ default { ... }
}
}