Permalink
Browse files

Avoid uninit warning when $ENV{SERVER_PORT} is not defined

  • Loading branch information...
1 parent da662dc commit 2acc4f5312a77ec3391599cc8793c2eae3e0f0fa @autarch autarch committed Mar 3, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/VegGuide/Config.pm
View
@@ -250,7 +250,7 @@ sub CanonicalWebHostname {
my $hostname = $class->Hostname();
$hostname = 'www.vegguide.org' if $hostname eq 'vegguide.org';
- $hostname .= ':' . $ENV{SERVER_PORT} || 3000
+ $hostname .= ':' . ( $ENV{SERVER_PORT} // 3000 )
unless $class->IsProduction();
return $hostname;

0 comments on commit 2acc4f5

Please sign in to comment.