# HG changeset patch # User Heiko Schlittermann (JUMPER) # Date 1378033153 -7200 # Node ID 7ce40ff508717b58fc13f7b85aeda1f944a7d43f # Parent f5f3abf444149fa156a070ab337c7c48a62d0f7e added perlcritic diff -r f5f3abf44414 -r 7ce40ff50871 .perlcriticrc --- /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 diff -r f5f3abf44414 -r 7ce40ff50871 .vim/compiler/perlcritic.vim --- /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 +" Last Change: 2006 Dec 19 + +if exists("current_compiler") + finish +endif +let current_compiler = "perlcritic" + +if exists(":CompilerSet") != 2 + command -nargs=* CompilerSet setlocal +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 diff -r f5f3abf44414 -r 7ce40ff50871 .vim/ftplugin/perl_hs12.vim --- 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: diff -r f5f3abf44414 -r 7ce40ff50871 install --- 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 { ... } } }