diff --git a/lib/DDG/Goodie/Parcelforce.pm b/lib/DDG/Goodie/Parcelforce.pm index 4caecd484..6e2d45547 100644 --- a/lib/DDG/Goodie/Parcelforce.pm +++ b/lib/DDG/Goodie/Parcelforce.pm @@ -34,17 +34,15 @@ triggers query_nowhitespace_nodash => qr/ handle query_nowhitespace_nodash => sub { my $parcel_number = $+{parcel_number}; - - # Exit if $parcel_number doesn't exist. - return unless $parcel_number; - # Exit if $parcel_number starts with ISBN. - return if $parcel_number =~ /^isbn/i; + if ($parcel_number && $parcel_number !~ /^isbn/i) { - return $parcel_number, - heading => 'Parcelforce Tracking', - html => - qq(Track this parcel at Parcelforce.); -}; + return $parcel_number, + heading => 'Parcelforce Tracking', + html => + qq(Track this parcel at Parcelforce.); + }; + return; +}; 1;