Skip to content

Commit e667a1a

Browse files
committed
Latest Display.pm from upstream VWF
1 parent 86d94c3 commit e667a1a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/Geo/Coder/Free/Display.pm

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ sub new
6868
my $params = Params::Get::get_params(undef, @_);
6969

7070
if(!defined($class)) {
71-
# Using VWF::Display->new(), not VWF::Display::new()
71+
# Using Geo::Coder::Free::Display->new(), not Geo::Coder::Free::Display::new()
7272
# carp(__PACKAGE__, ' use ->new() not ::new() to instantiate');
7373
# return;
7474

@@ -81,7 +81,10 @@ sub new
8181

8282
if(defined($ENV{'HTTP_REFERER'})) {
8383
# Protect against Shellshocker
84-
require 'Data::Validate::URI' && Data::Validate::URI->import() unless Data::Validate::URI->can('new');
84+
unless(Data::Validate::URI->can('new')) {
85+
require Data::Validate::URI;
86+
Data::Validate::URI->import();
87+
}
8588

8689
unless(Data::Validate::URI->new()->is_uri($ENV{'HTTP_REFERER'})) {
8790
return; # Block invalid referrers

0 commit comments

Comments
 (0)