summaryrefslogtreecommitdiff
path: root/dist/constant
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-08-25 21:45:50 -0700
committerFather Chrysostomos <sprout@cpan.org>2014-08-25 22:17:03 -0700
commitc74c910354b23a72ca206fca8972f0ce32838c85 (patch)
treea753107d8023931c5907b4e76f4e60fcdc55cb93 /dist/constant
parent1e44cfb7351a9eb6bb0febe1dee9422987720797 (diff)
downloadperl-c74c910354b23a72ca206fca8972f0ce32838c85.tar.gz
constant.pm: Remove redundant truth checks
It is not possible to reach these without $symtab’s having been assigned a stash reference.
Diffstat (limited to 'dist/constant')
-rw-r--r--dist/constant/lib/constant.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/dist/constant/lib/constant.pm b/dist/constant/lib/constant.pm
index a838d7ee02..d1b32c57d7 100644
--- a/dist/constant/lib/constant.pm
+++ b/dist/constant/lib/constant.pm
@@ -162,7 +162,7 @@ sub import {
# The check in Perl_ck_rvconst knows that inlinable
# constants from cv_const_sv are read only. So we have to:
Internals::SvREADONLY($scalar, 1);
- if ($symtab && !exists $symtab->{$name}) {
+ if (!exists $symtab->{$name}) {
$symtab->{$name} = \$scalar;
++$flush_mro->{$pkg};
}
@@ -178,7 +178,7 @@ sub import {
if (_CAN_PCS_FOR_ARRAY) {
_make_const($list[$_]) for 0..$#list;
_make_const(@list);
- if ($symtab && !exists $symtab->{$name}) {
+ if (!exists $symtab->{$name}) {
$symtab->{$name} = \@list;
$flush_mro->{$pkg}++;
}