From: Nicholas Clark Date: Fri, 23 Oct 2009 20:29:49 +0000 (+0100) Subject: Avoid using defined %hash in core code and tests. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=902fde96768bb39d4175218f674fe7b3c162dddd;p=p5sagit%2Fp5-mst-13.2.git Avoid using defined %hash in core code and tests. --- diff --git a/ext/B/B/Concise.pm b/ext/B/B/Concise.pm index 067d89e..671212d 100644 --- a/ext/B/B/Concise.pm +++ b/ext/B/B/Concise.pm @@ -14,7 +14,7 @@ use warnings; # uses #3 and #4, since warnings uses Carp use Exporter (); # use #5 -our $VERSION = "0.77"; +our $VERSION = "0.78"; our @ISA = qw(Exporter); our @EXPORT_OK = qw( set_style set_style_standard add_callback concise_subref concise_cv concise_main @@ -299,7 +299,7 @@ sub compileOpts { elsif ($o =~ /^-stash=(.*)/) { my $pkg = $1; no strict 'refs'; - if (!defined %{$pkg.'::'}) { + if (! %{$pkg.'::'}) { eval "require $pkg"; } else { require Config; diff --git a/lib/DBM_Filter.pm b/lib/DBM_Filter.pm index 8947c0c..abcc127 100644 --- a/lib/DBM_Filter.pm +++ b/lib/DBM_Filter.pm @@ -2,7 +2,7 @@ package DBM_Filter ; use strict; use warnings; -our $VERSION = '0.02'; +our $VERSION = '0.03'; package Tie::Hash ; @@ -93,7 +93,7 @@ sub _do_Filter_Push no strict 'refs'; # does the "DBM_Filter::$class" exist? - if ( ! defined %{ "${class}::"} ) { + if ( ! %{ "${class}::"} ) { # Nope, so try to load it. eval " require $class ; " ; croak "$caller: Cannot Load DBM Filter '$class': $@" if $@; diff --git a/t/op/magic.t b/t/op/magic.t index 6e3da53..975be11 100644 --- a/t/op/magic.t +++ b/t/op/magic.t @@ -382,7 +382,7 @@ SKIP: { ok scalar eval q{ %!; - defined %Errno::; + scalar %Errno::; }, $@; }