Skip to content

Commit f4c2b9e

Browse files
committed
Fix Odd number of elements in hash assignment
1 parent 4ae4c51 commit f4c2b9e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/VWF/Display.pm

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ use VWF::Utils;
2727
use Error;
2828
use Fatal qw(:void open);
2929
use File::pfopen;
30+
use Params::Get;
3031
use Scalar::Util;
3132

3233
# TODO: read this from the config file
@@ -400,7 +401,7 @@ Returns the HTTP header section, terminated by an empty line
400401
sub http
401402
{
402403
my $self = shift;
403-
my %params = (ref($_[0]) eq 'HASH') ? %{$_[0]} : @_;
404+
my $params = Params::Get::get_params(undef, @_);
404405

405406
# Handle session cookies
406407
# TODO: Only session cookies as the moment
@@ -416,9 +417,9 @@ sub http
416417
# my $language = $self->{_lingua} ? $self->{_lingua}->language() : 'English';
417418

418419
my $rc;
419-
if($params{'Content-Type'}) {
420+
if($params->{'Content-Type'}) {
420421
# Allow the content type to be forceably set
421-
$rc = $params{'Content-Type'} . "\n";
422+
$rc = $params->{'Content-Type'} . "\n";
422423
} else {
423424
# Determine content type
424425
my $filename = $self->get_template_path();

0 commit comments

Comments
 (0)