Skip Menu |
 

This queue is for tickets about the Unicode-LineBreak CPAN distribution.

Report information
The Basics
Id: 125669
Status: new
Priority: 0/
Queue: Unicode-LineBreak

People
Owner: Nobody in particular
Requestors: dmacks [...] netspace.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Cleaner Makefile recipe for downloading test datasets
Date: Sat, 23 Jun 2018 23:19:43 -0400
To: <bug-Unicode-LineBreak [...] rt.cpan.org>
From: Daniel Macks <dmacks [...] netspace.org>
Download (untitled) / with headers
text/plain 1.3k
The downloading of test datasets seems overly complicated. From Unicode-LineBreak-2018.003 on OS X 10.13 using Apple's perl-5.18.2, Makefile.PL generates Makefile that contains: copy_unidata : cd test-data; \ [ -f LineBreakTest.txt ] || \ wget -q -N -O LineBreakTest.txt \ ftp://unicode.org/Public/8.0.0/ucd/auxiliary/LineBreakTest*.txt \ || $(NOOP) cd test-data; \ [ -f GraphemeBreakTest.txt ] || \ wget -q -N -O GraphemeBreakTest.txt \ ftp://unicode.org/Public/8.0.0/ucd/auxiliary/GraphemeBreakTest*.txt \ || $(NOOP) The concept is that each file needs to exist, and if it doesn't, a command should be executed to create it. That suggests that each file could have its own recipe and use standard Makefile dependencies rather than a monolithic set of shell file tests. For example: copy_unidata : test-data/LineBreakTest.txt test-data/GraphemeBreakTest.txt test-data/LineBreakTest.txt: wget -q -N -O $@ ftp://unicode.org/Public/8.0.0/ucd/auxiliary/LineBreakTest*.txt test-data/GraphemeTest.txt: wget -q -N -O $@ ftp://unicode.org/Public/8.0.0/ucd/auxiliary/GraphemeBreakTest*.txt It's now also self-documenting what needs what and how it comes to exist. I'm not sure why the "|| $(NOOP)" was used, but it seems like that would mask failures of wget, leaving things in a poor state and triggering harder-to-diagnose failures later. dan


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.