From: Graham Knop Date: Tue, 3 Nov 2015 23:11:25 +0000 (-0500) Subject: more sensible hash vs hashref checking X-Git-Tag: v2.000002~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=da50db3f44b8220b3184875b17104e565b42cd3d;p=p5sagit%2Fstrictures.git more sensible hash vs hashref checking --- diff --git a/lib/strictures.pm b/lib/strictures.pm index 91b4018..79ffcc0 100644 --- a/lib/strictures.pm +++ b/lib/strictures.pm @@ -106,7 +106,7 @@ our $Smells_Like_VCS; sub import { my $class = shift; - my %opts = ref $_[0] ? %{$_[0]} : @_; + my %opts = @_ == 1 ? %{$_[0]} : @_; if (!exists $opts{version}) { $opts{version} = exists $^H{strictures_enable} ? delete $^H{strictures_enable}