summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Crane <arc@cpan.org>2017-10-24 18:36:14 +0100
committerAaron Crane <arc@cpan.org>2017-10-24 18:36:14 +0100
commit9a6a95281df0a1aae6bb08e9f8dbdd226d33db28 (patch)
treefa36282c35b040ad77dec49e6c1b8532a39f6a69
parentcb2b5788e3a043ab23b2ec54670723c93ef70e1b (diff)
Move read_exclusions() function to files.pl
-rw-r--r--mcon/pl/files.pl19
-rw-r--r--mcon/pl/wanted.pl19
2 files changed, 19 insertions, 19 deletions
diff --git a/mcon/pl/files.pl b/mcon/pl/files.pl
index 3962fa6..b983832 100644
--- a/mcon/pl/files.pl
+++ b/mcon/pl/files.pl
@@ -106,3 +106,22 @@ sub q {
$_;
}
+sub read_exclusions {
+ my ($filename) = @_;
+ print "Reading exclusions from $filename...\n" unless $opt_s;
+ open(EXCLUSIONS, "< $filename\0") || die "Can't read $filename: $!\n";
+ local $_;
+ while (<EXCLUSIONS>) {
+ if (/^\s*#|^\s*$/) {
+ # comment or blank line, ignore
+ }
+ elsif (/^\s*(\w+)\s*$/) {
+ $excluded_symbol{$1} = 1;
+ }
+ else {
+ die "$filename:$.: unrecognised line\n";
+ }
+ }
+ close(EXCLUSIONS) || die "Can't close $filename: $!\n";
+}
+
diff --git a/mcon/pl/wanted.pl b/mcon/pl/wanted.pl
index 6a44039..20d218c 100644
--- a/mcon/pl/wanted.pl
+++ b/mcon/pl/wanted.pl
@@ -39,25 +39,6 @@
;#
;# The manifake() routine has to be provided externally.
;#
-sub read_exclusions {
- my ($filename) = @_;
- print "Reading exclusions from $filename...\n" unless $opt_s;
- open(EXCLUSIONS, "< $filename\0") || die "Can't read $filename: $!\n";
- local $_;
- while (<EXCLUSIONS>) {
- if (/^\s*#|^\s*$/) {
- # comment or blank line, ignore
- }
- elsif (/^\s*(\w+)\s*$/) {
- $excluded_symbol{$1} = 1;
- }
- else {
- die "$filename:$.: unrecognised line\n";
- }
- }
- close(EXCLUSIONS) || die "Can't close $filename: $!\n";
-}
-
# Build a wanted file from the files held in @SHlist and @clist arrays
sub build_wanted {
# If wanted file is already there, parse it to map obsolete if -o option