From: Nicholas Clark Date: Fri, 23 Oct 2009 20:33:27 +0000 (+0100) Subject: In I18N::LangTags::Detect, avoid using defined @array and defined %hash. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=08f2910fedd8fc4c335b753d655fd4e769da3784;p=p5sagit%2Fp5-mst-13.2.git In I18N::LangTags::Detect, avoid using defined @array and defined %hash. --- diff --git a/dist/I18N-LangTags/lib/I18N/LangTags/Detect.pm b/dist/I18N-LangTags/lib/I18N/LangTags/Detect.pm index 3f1b7c0..87280b7 100644 --- a/dist/I18N-LangTags/lib/I18N/LangTags/Detect.pm +++ b/dist/I18N-LangTags/lib/I18N/LangTags/Detect.pm @@ -11,7 +11,7 @@ use vars qw( @ISA $VERSION $MATCH_SUPERS $USING_LANGUAGE_TAGS BEGIN { unless(defined &DEBUG) { *DEBUG = sub () {0} } } # define the constant 'DEBUG' at compile-time -$VERSION = "1.03"; +$VERSION = "1.04"; @ISA = (); use I18N::LangTags qw(alternate_language_tags locale2language_tag); @@ -137,7 +137,7 @@ sub _try_use { # Basically a wrapper around "require Modulename" my $module = $_[0]; # ASSUME sane module name! { no strict 'refs'; return($tried{$module} = 1) - if defined(%{$module . "::Lexicon"}) or defined(@{$module . "::ISA"}); + if %{$module . "::Lexicon"} or @{$module . "::ISA"}; # weird case: we never use'd it, but there it is! }