perl_mlb
view release on metacpan or search on metacpan
charnames.pm view on Meta::CPAN
warn "unsupported special '$_' in charnames";
next;
}
push @args, $_;
}
@args == 0 && $promote and @args = (":full");
@h{@args} = (1) x @args;
$^H{charnames_full} = delete $h{':full'};
$^H{charnames_short} = delete $h{':short'};
$^H{charnames_scripts} = [map uc, keys %h];
##
## If utf8? warnings are enabled, and some scripts were given,
## see if at least we can find one letter of each script.
##
if (warnings::enabled('utf8') && @{$^H{charnames_scripts}}) {
$txt = do "unicore/Name.pl" unless $txt;
for my $script (@{$^H{charnames_scripts}}) {
if (not $txt =~ m/\t\t$script (?:CAPITAL |SMALL )?LETTER /) {
overload.pm view on Meta::CPAN
}
elsif (!ref $_ [1] || "$_[1]" !~ /CODE\(0x[\da-f]+\)$/) {
# Can't use C<ref $_[1] eq "CODE"> above as code references can be
# blessed, and C<ref> would return the package the ref is blessed into.
if (warnings::enabled) {
$_ [1] = "undef" unless defined $_ [1];
warnings::warn ("`$_[1]' is not a code reference");
}
}
else {
$^H{$_[0]} = $_[1];
$^H |= $constants{$_[0]} | $overload::hint_bits;
}
shift, shift;
}
}
sub remove_constant {
# Arguments: what, sub
while (@_) {
delete $^H{$_[0]};
$^H &= ~ $constants{$_[0]};
shift, shift;
}
}
1;
__END__
=head1 NAME
( run in 0.250 second using v1.01-cache-2.11-cpan-2b0bae70ee8 )