In makedef.pl, eliminate now-superfluous chomp and file-content processing.
authorNicholas Clark <nick@ccl4.org>
Tue, 26 Jul 2011 09:16:02 +0000 (11:16 +0200)
committerNicholas Clark <nick@ccl4.org>
Mon, 1 Aug 2011 09:53:54 +0000 (11:53 +0200)
commitd3906116bf921c970873a137d5af3a45538d625e
tree5e4784c32ae35c881b7dfc354b90868e4cbdee7d
parente7c4906b340e871bf1f60e8036d252e23c9d8720
In makedef.pl, eliminate now-superfluous chomp and file-content processing.

emit_symbol() would chomp every symbol passed to it. The chomp was added in
3e3baf6d63945cb6, in the refactoring which replaced print statements with
emit_symbol(), because its callers (still) passed it the values previously
printed, values generated from the lines of files. The chomp in emit_symbol()
probably should have been removed as part of 22239a37ce131e4f, which unified
the code that parsed external files, adding chomp there, and added chomp to
the code which read from <DATA>.

The chomp of <DATA> added in 22239a37ce131e4f was moved wholesale with all
the file-content specific processing into a new routine try_symbol() in
commit 549a6b102c2ac8c4 on the cfgperl branch. That commit and subsequent
commits used try_symbol() as the general-purpose routine to add symbols to
the export list, even though it also had all the specific file processing
code to ignore comments and other text that did not look like symbols.

An analogous alternative routine to add symbols to the export list,
emit_symbols(), was added to blead 6 days earlier in commit 51371543ca1a75ed.

As makedef.pl no longer uses <DATA>, and reading from external files is
nicely encapsulated, all this vestigial code can be removed.

Technical debt from 1997 and 1999 finally being eliminated.
makedef.pl