diff --git a/lib/Perlanet/Trait/FeedFile.pm b/lib/Perlanet/Trait/FeedFile.pm index 250d7fb..1621cd5 100644 --- a/lib/Perlanet/Trait/FeedFile.pm +++ b/lib/Perlanet/Trait/FeedFile.pm @@ -42,7 +42,7 @@ has 'feed' => ( isa => 'HashRef', is => 'rw', default => sub { - { file => 'atom.xml', format => 'Atom' } + { file => 'atom.xml', format => 'Atom' }; }, ); diff --git a/lib/Perlanet/Trait/TemplateToolkit.pm b/lib/Perlanet/Trait/TemplateToolkit.pm index 5f426e8..2caf65a 100644 --- a/lib/Perlanet/Trait/TemplateToolkit.pm +++ b/lib/Perlanet/Trait/TemplateToolkit.pm @@ -50,7 +50,7 @@ has 'page' => ( isa => 'HashRef', is => 'rw', default => sub { - { file => 'index.html', template => 'index.tt' } + { file => 'index.html', template => 'index.tt' }; }, ); diff --git a/lib/Perlanet/Trait/YAMLConfig.pm b/lib/Perlanet/Trait/YAMLConfig.pm index 49328e8..64fc5ad 100644 --- a/lib/Perlanet/Trait/YAMLConfig.pm +++ b/lib/Perlanet/Trait/YAMLConfig.pm @@ -79,7 +79,7 @@ use constant THIRTY_DAYS => 30 * 24 * 60 * 60; sub get_config_from_file { my ($self, $file) = @_; - open my $cfg_file, '<:utf8', $file + open my $cfg_file, '<:encoding(UTF-8)', $file or croak "Cannot open file $file: $!"; my $cfg = LoadFile($cfg_file);