our $VERSION = '1.06';
# import and combine various digraph data
-my $rfc = do 'data/digraphs-rfc.inc.pl'
+push @INC, 'data';
+my $rfc = do 'digraphs-rfc.inc.pl'
or die "error reading digraphs include: ", $@ // $!;
-my $extra = do 'data/digraphs-shiar.inc.pl'
+my $extra = do 'digraphs-shiar.inc.pl'
or warn "could not include shiar proposals: ", $@ // $!;
-my $vim = do 'data/digraphs-vim.inc.pl'
+my $vim = do 'digraphs-vim.inc.pl'
or warn "could not include vim extensions ", $@ // $!;
-my $vimold = do 'data/digraphs-vim-74.inc.pl'
+my $vimold = do 'digraphs-vim-74.inc.pl'
or warn "could not include vim compatibility ", $@ // $!;
my $di = { %{$vim // {}}, %{$rfc}, %{$extra // {}} };
# optionally get unicode character information
-my $uninfo = do 'data/unicode-char.inc.pl'
+my $uninfo = do 'unicode-char.inc.pl'
or warn "could not include unicode details: ", $@ // $!;
# output perl code of hash
my $incsuffix = '.inc.pl';
for my $fontfile (glob 'data/font/*'.$incsuffix) {
my ($fontid) = basename($fontfile, $incsuffix);
- my ($fontmeta, @fontrange) = do $fontfile or next;
+ my ($fontmeta, @fontrange) = do "./$fontfile";
+ if (!$fontmeta) {
+ warn "$fontfile: $!";
+ next;
+ }
$fontmeta->{file} = $fontid;
my $year = substr $fontmeta->{date}, 0, 4;
$fontmeta->{description} = join(' ',
$charlist{table}->{abc} = ['A'..'Z', 'a'..'z'];
-my $chartables = do 'unicode-table.inc.pl' or warn $@ || $!;
+my $chartables = do './unicode-table.inc.pl' or warn $@ || $!;
if ($chartables) {
while (my ($tablegroup, $grouprow) = each %{$chartables}) {
while (my ($tablename, $chars) = each %{$grouprow}) {
} or warn "Could not include count for html entities: $@";
eval {
- my $agemap = do 'data/unicode-age.inc.pl'
+ my $agemap = do './data/unicode-age.inc.pl'
or warn "Could not include unicode version data: $!";
use Unicode::UCD 'charinfo';
#!/usr/bin/env perl
use 5.014;
+BEGIN { push @INC, '.'; }
use Shiar_Sheet::Colour 1.05;
say "# automatically generated by $0";