Skip to content

Commit

Permalink
no need to leak a handle if we control the module
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Aug 16, 2016
1 parent 77aa8d7 commit a2700bd
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/Mojo/Util.pm
Expand Up @@ -32,13 +32,11 @@ use constant {
# To generate a new HTML entity table run this command
# perl examples/entities.pl
my %ENTITIES;
{
local $.;
for my $line (split "\n", join('', <DATA>)) {
next unless $line =~ /^(\S+)\s+U\+(\S+)(?:\s+U\+(\S+))?/;
$ENTITIES{$1} = defined $3 ? (chr(hex $2) . chr(hex $3)) : chr(hex $2);
}
for my $line (split "\n", join('', <DATA>)) {
next unless $line =~ /^(\S+)\s+U\+(\S+)(?:\s+U\+(\S+))?/;
$ENTITIES{$1} = defined $3 ? (chr(hex $2) . chr(hex $3)) : chr(hex $2);
}
close DATA;

# Characters that should be escaped in XML
my %XML = (
Expand Down

0 comments on commit a2700bd

Please sign in to comment.