Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

renamed config-var and sorted out some code

  • Loading branch information...
commit 07ce87656b8ed04ebaaa28e7206f892afc81101f 1 parent 67e4fda
@borisdaeppen borisdaeppen authored
View
2  pod_book/config.yml
@@ -6,7 +6,7 @@ logging:
caching:
seconds: 864000
name: cpan2ebook_webservice
- perltuts: PerltutsCom
+ name_perltuts: PerltutsCom
userblock_seconds: 2
tmp_dir: /home/ebook/tmp
reverse_proxy: 1
View
10 pod_book/lib/PodBook/Perltuts.pm
@@ -19,7 +19,6 @@ sub list {
# lets load some values from the config file
my $config = $self->config;
- my $userblock_seconds = $config->{userblock_seconds};
my $caching_seconds = $config->{caching}->{seconds};
my $tmp_dir = $config->{tmp_dir};
@@ -170,13 +169,14 @@ sub _get_tutorial_list {
sub _cache {
my ($self) = @_;
- my $config = $self->config || { tmp_dir => '/tmp' };
- my $tmpdir = $config->{tmp_dir};
- my $namespace = $config->{caching}->{perltuts};
+ # lets load some values from the config file
+ my $config = $self->config;
+ my $namespace = $config->{caching}->{name_perltuts};
+ my $tmp_dir = $config->{tmp_dir};
my $cache = CHI->new(
driver => 'File',
- root_dir => $tmpdir,
+ root_dir => $tmp_dir,
namespace => $namespace,
serializer => 'Storable',
);
View
2  scripts/fetch_perltuts.pl
@@ -45,7 +45,7 @@
die "anything with YAML parsing went wrong!" if !$yaml;
my $tmpdir = $yaml->[0]->{tmp_dir};
-my $namespace = $yaml->[0]->{caching}->{perltuts};
+my $namespace = $yaml->[0]->{caching}->{name_perltuts};
my $cache = CHI->new(
driver => 'File',
Please sign in to comment.
Something went wrong with that request. Please try again.