slurp on init, not handle

master
Dylan Lloyd 2013-05-12 16:28:11 -04:00
parent a3a022f812
commit 3a3acbbe3e
1 changed files with 5 additions and 5 deletions

View File

@ -20,15 +20,15 @@ code_url 'https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DD
category 'computing_info';
topics 'programming';
# UnicodeData.txt is a semicolon-separated file.
# Uploaded file version: 6.3.0, obtained from
# ftp://ftp.unicode.org/Public/6.3.0/ucd/
my @lines = split /\n/, share("UnicodeData.txt")->slurp;
handle remainder => sub {
return unless $_;
my $pattern = uc join('.*', $_);
# UnicodeData.txt is a semicolon-separated file.
# Uploaded file version: 6.3.0, obtained from
# ftp://ftp.unicode.org/Public/6.3.0/ucd/
my @lines = split /\n/, share("UnicodeData.txt")->slurp;
# 1st column = number ; 2nd column = name. See
# http://www.unicode.org/draft/ucd/UnicodeData.html
my @matches;