From 82f0facb620e59594aaf318c2eaf676c7788f1e6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 26 Jul 2008 21:14:07 -0400 Subject: [PATCH] fixups --- IkiWiki/Plugin/search.pm | 3 ++- IkiWiki/Plugin/typography.pm | 1 - IkiWiki/Rcs/bzr.pm | 2 +- IkiWiki/Rcs/git.pm | 2 +- IkiWiki/Rcs/mercurial.pm | 2 +- IkiWiki/Rcs/monotone.pm | 2 +- IkiWiki/Rcs/svn.pm | 2 +- IkiWiki/Rcs/tla.pm | 2 +- IkiWiki/Setup.pm | 2 +- IkiWiki/Setup/Standard.pm | 3 --- 10 files changed, 9 insertions(+), 12 deletions(-) diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index c45e59c8e..cb12d9500 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -19,6 +19,7 @@ sub getsetup () { #{{{ return omega_cgi => { type => "string", + example => "/usr/lib/cgi-bin/omega/omega", description => "path to the omega cgi program", safe => 0, # external program rebuild => 0, @@ -32,7 +33,7 @@ sub checkconfig () { #{{{ } } - if (! exists $config{omega_cgi}) { + if (! defined $config{omega_cgi}) { $config{omega_cgi}="/usr/lib/cgi-bin/omega/omega"; } } #}}} diff --git a/IkiWiki/Plugin/typography.pm b/IkiWiki/Plugin/typography.pm index 5ba14084b..6229e6c33 100644 --- a/IkiWiki/Plugin/typography.pm +++ b/IkiWiki/Plugin/typography.pm @@ -27,7 +27,6 @@ sub getsetup () { #{{{ typographyattributes => { type => "string", example => "3", - example => "tag", description => "Text::Typography attributes value", safe => 1, rebuild => 1, diff --git a/IkiWiki/Rcs/bzr.pm b/IkiWiki/Rcs/bzr.pm index 136f2d20f..5df522f6e 100644 --- a/IkiWiki/Rcs/bzr.pm +++ b/IkiWiki/Rcs/bzr.pm @@ -12,7 +12,7 @@ hook(type => "checkconfig", id => "bzr", call => sub { #{{{ if (! defined $config{diffurl}) { $config{diffurl}=""; } - if (exists $config{bzr_wrapper}) { + if (length $config{bzr_wrapper}) { push @{$config{wrappers}}, { wrapper => $config{bzr_wrapper}, wrappermode => (defined $config{bzr_wrappermode} ? $config{bzr_wrappermode} : "06755"), diff --git a/IkiWiki/Rcs/git.pm b/IkiWiki/Rcs/git.pm index f8614e4a1..6c9aca650 100644 --- a/IkiWiki/Rcs/git.pm +++ b/IkiWiki/Rcs/git.pm @@ -21,7 +21,7 @@ hook(type => "checkconfig", id => "git", call => sub { #{{{ if (! defined $config{gitmaster_branch}) { $config{gitmaster_branch}="master"; } - if (exists $config{git_wrapper}) { + if (length $config{git_wrapper}) { push @{$config{wrappers}}, { wrapper => $config{git_wrapper}, wrappermode => (defined $config{git_wrappermode} ? $config{git_wrappermode} : "06755"), diff --git a/IkiWiki/Rcs/mercurial.pm b/IkiWiki/Rcs/mercurial.pm index 0cc1e291d..3a98e09d8 100644 --- a/IkiWiki/Rcs/mercurial.pm +++ b/IkiWiki/Rcs/mercurial.pm @@ -12,7 +12,7 @@ hook(type => "checkconfig", id => "mercurial", call => sub { #{{{ if (! defined $config{diffurl}) { $config{diffurl}=""; } - if (exists $config{mercurial_wrapper}) { + if (length $config{mercurial_wrapper}) { push @{$config{wrappers}}, { wrapper => $config{mercurial_wrapper}, wrappermode => (defined $config{mercurial_wrappermode} ? $config{mercurial_wrappermode} : "06755"), diff --git a/IkiWiki/Rcs/monotone.pm b/IkiWiki/Rcs/monotone.pm index 5e8579b2f..d7e8f296a 100644 --- a/IkiWiki/Rcs/monotone.pm +++ b/IkiWiki/Rcs/monotone.pm @@ -41,7 +41,7 @@ hook(type => "checkconfig", id => "monotone", call => sub { #{{{ error("Monotone version too old, is $version but required 0.38"); } - if (exists $config{mtn_wrapper}) { + if (length $config{mtn_wrapper}) { push @{$config{wrappers}}, { wrapper => $config{mtn_wrapper}, wrappermode => (defined $config{mtn_wrappermode} ? $config{mtn_wrappermode} : "06755"), diff --git a/IkiWiki/Rcs/svn.pm b/IkiWiki/Rcs/svn.pm index e34d8fe3e..0e7df3659 100644 --- a/IkiWiki/Rcs/svn.pm +++ b/IkiWiki/Rcs/svn.pm @@ -20,7 +20,7 @@ hook(type => "checkconfig", id => "svn", call => sub { #{{{ $config{svnpath}=~s/\/$//; $config{svnpath}=~s/^\///; } - if (exists $config{svn_wrapper}) { + if (length $config{svn_wrapper}) { push @{$config{wrappers}}, { wrapper => $config{svn_wrapper}, wrappermode => (defined $config{svn_wrappermode} ? $config{svn_wrappermode} : "04755"), diff --git a/IkiWiki/Rcs/tla.pm b/IkiWiki/Rcs/tla.pm index 53c198032..e1389a346 100644 --- a/IkiWiki/Rcs/tla.pm +++ b/IkiWiki/Rcs/tla.pm @@ -10,7 +10,7 @@ hook(type => "checkconfig", id => "tla", call => sub { #{{{ if (! defined $config{diffurl}) { $config{diffurl}=""; } - if (exists $config{tla_wrapper}) { + if (length $config{tla_wrapper}) { push @{$config{wrappers}}, { wrapper => $config{tla_wrapper}, wrappermode => (defined $config{tla_wrappermode} ? $config{tla_wrappermode} : "06755"), diff --git a/IkiWiki/Setup.pm b/IkiWiki/Setup.pm index 92f1eadb5..38b715202 100644 --- a/IkiWiki/Setup.pm +++ b/IkiWiki/Setup.pm @@ -67,7 +67,7 @@ sub load ($) { # {{{ } } - if (exists $config{cgi_wrapper}) { + if (length $config{cgi_wrapper}) { push @{$config{wrappers}}, { cgi => 1, wrapper => $config{cgi_wrapper}, diff --git a/IkiWiki/Setup/Standard.pm b/IkiWiki/Setup/Standard.pm index d1c53c064..d96964a23 100644 --- a/IkiWiki/Setup/Standard.pm +++ b/IkiWiki/Setup/Standard.pm @@ -71,9 +71,6 @@ sub dumpvalues ($@) { #{{{ push @ret, dumpline($key, $setup->{$key}, $info{type}, ""); delete $setup->{$key}; } - elsif (exists $info{default} && defined $info{default}) { - push @ret, dumpline($key, $info{default}, $info{type}, "#"); - } elsif (exists $info{example}) { push @ret, dumpline($key, $info{example}, $info{type}, "#"); }