diff options
author | Julian Blake Kongslie <jblake@omgwallhack.org> | 2010-10-11 22:14:56 -0700 |
---|---|---|
committer | jblake+piny@omgwallhack.org <jblake@omgwallhack.org> | 2010-10-11 22:14:56 -0700 |
commit | 668d2eac0b9882eb932ffc939e12e6fdf43c410a (patch) | |
tree | 89f223ef2ecececd476a2852351db4be0dda5e43 /usr | |
parent | 78969093592e17ea1c5a78b294d7d7a282b21ab2 (diff) | |
download | piny-code-668d2eac0b9882eb932ffc939e12e6fdf43c410a.tar.gz piny-code-668d2eac0b9882eb932ffc939e12e6fdf43c410a.zip |
Change tweakable names to make git happy.
Diffstat (limited to 'usr')
-rw-r--r-- | usr/src/libpiny/lib/Piny/Config.pm | 12 | ||||
-rw-r--r-- | usr/src/libpiny/lib/Piny/Repo.pm | 14 |
2 files changed, 14 insertions, 12 deletions
diff --git a/usr/src/libpiny/lib/Piny/Config.pm b/usr/src/libpiny/lib/Piny/Config.pm index cfbe2c6..8894bad 100644 --- a/usr/src/libpiny/lib/Piny/Config.pm +++ b/usr/src/libpiny/lib/Piny/Config.pm @@ -127,6 +127,8 @@ sub tweakable { my $attrname = $attr; $attrname =~ s/_/./; + if ( $attrname =~ /_/ ) { croak "Illegal attribute name $attrname! (use only one underbar)"; }; + has $attr => ( is => 'rw' , isa => 'Str' @@ -167,11 +169,11 @@ sub tweakable { # The tweakables -tweakable "piny_ikiwiki_destdir" => "/srv/www/piny.be/"; -tweakable "piny_ikiwiki_srcdir" => "/srv/ikiwiki/"; -tweakable "piny_ikiwiki_url" => "http://piny.be/"; -tweakable "piny_ikiwiki_secure_url" => "https://secure.piny.be/"; -tweakable "piny_ikiwiki_secure_path" => "/srv/www/secure.piny.be/"; +tweakable "piny_ikiwikidestdir" => "/srv/www/piny.be/"; +tweakable "piny_ikiwikisrcdir" => "/srv/ikiwiki/"; +tweakable "piny_ikiwikiurl" => "http://piny.be/"; +tweakable "piny_ikiwikisecureurl" => "https://secure.piny.be/"; +tweakable "piny_ikiwikisecurepath" => "/srv/www/secure.piny.be/"; tweakable "receive_denyNonFastforwards" => "true"; # Moose boilerplate diff --git a/usr/src/libpiny/lib/Piny/Repo.pm b/usr/src/libpiny/lib/Piny/Repo.pm index 31b7a70..5dd965a 100644 --- a/usr/src/libpiny/lib/Piny/Repo.pm +++ b/usr/src/libpiny/lib/Piny/Repo.pm @@ -514,31 +514,31 @@ sub _build_ikiwiki_setup { sub _build_ikiwiki_destdir { my ( $s ) = @_; - return $s->config->piny_ikiwiki_destdir . $s->name; + return $s->config->piny_ikiwikidestdir . $s->name; }; sub _build_ikiwiki_srcdir { my ( $s ) = @_; - return $s->config->piny_ikiwiki_srcdir . $s->name; + return $s->config->piny_ikiwikisrcdir . $s->name; }; sub _build_ikiwiki_url { my ( $s ) = @_; - return $s->config->piny_ikiwiki_url . $s->name; + return $s->config->piny_ikiwikiurl . $s->name; }; sub _build_ikiwiki_cgiurl { my ( $s ) = @_; - return $s->config->piny_ikiwiki_secure_url . "repos/" . $s->name . "/ikiwiki.cgi"; + return $s->config->piny_ikiwikisecureurl . "repos/" . $s->name . "/ikiwiki.cgi"; }; sub _build_secure_path { my ( $s ) = @_; - return $s->config->piny_ikiwiki_secure_path . "repos/" . $s->name; + return $s->config->piny_ikiwikisecurepath . "repos/" . $s->name; }; sub _build_ikiwiki_cgipath { @@ -553,7 +553,7 @@ sub _build_ikiwiki_historyurl { if ( defined $s->config->{"https_url"} ) { return $s->config->{"https_url"} . "cgit/" . $s->name . "/log/[[file]]"; } else { - return $s->config->piny_ikiwiki_secure_url . "cgit/" . $s->name . "/log/[[file]]"; + return $s->config->piny_ikiwikisecureurl . "cgit/" . $s->name . "/log/[[file]]"; }; }; @@ -563,7 +563,7 @@ sub _build_ikiwiki_diffurl { if ( defined $s->config->{"https_url"} ) { return $s->config->{"https_url"} . "cgit/" . $s->name . "/diff/?id=[[sha1_commit]]"; } else { - return $s->config->piny_ikiwiki_secure_url . "cgit/" . $s->name . "/diff/?id=[[sha1_commit]]"; + return $s->config->piny_ikiwikisecureurl . "cgit/" . $s->name . "/diff/?id=[[sha1_commit]]"; }; }; |