summaryrefslogtreecommitdiff
path: root/mcon/pl
diff options
context:
space:
mode:
authorAaron Crane <arc@cpan.org>2017-10-24 19:27:43 +0100
committerAaron Crane <arc@cpan.org>2017-10-24 19:30:53 +0100
commit4db77aeffc4cd0e969c6379e621a6931027976f7 (patch)
tree8b75d3fb70b02e4d7a3eb1a022904ae1cea6b8f2 /mcon/pl
parente66b85ddbd27bb2a83eb28de957a3a0a276b7056 (diff)
Allow exclusions file to be named in .package
Diffstat (limited to 'mcon/pl')
-rw-r--r--mcon/pl/files.pl7
1 files changed, 7 insertions, 0 deletions
diff --git a/mcon/pl/files.pl b/mcon/pl/files.pl
index b983832..a7d26a6 100644
--- a/mcon/pl/files.pl
+++ b/mcon/pl/files.pl
@@ -29,6 +29,9 @@
;# extensions to their packages. For instance, perl5 adds .xs files holding
;# some C symbols.
;#
+;# The read_exclusions() routine honours the .package $exclusions_file
+;# variable if its argument is undefined.
+;#
# Extract filenames from manifest
sub extract_filenames {
&build_filext; # Construct &is_cfile and &is_shfile
@@ -108,6 +111,10 @@ sub q {
sub read_exclusions {
my ($filename) = @_;
+ if (!defined $filename) {
+ $filename = $exclusions_file; # default to name from .package
+ return if !defined $filename || $filename eq '';
+ }
print "Reading exclusions from $filename...\n" unless $opt_s;
open(EXCLUSIONS, "< $filename\0") || die "Can't read $filename: $!\n";
local $_;