diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-07-30 17:30:53 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-07-30 17:32:08 -0400 |
commit | 15be837bec36b343a54353e1d8179f0e532479cd (patch) | |
tree | 2d439cce21f413fc366c604b7a8bf293e1d4b2a9 | |
parent | f2c37e89f97cfa57b57d144eddca37e155d23127 (diff) | |
download | parse-keyword-15be837bec36b343a54353e1d8179f0e532479cd.tar.gz parse-keyword-15be837bec36b343a54353e1d8179f0e532479cd.zip |
add callparser_linkable to OBJECT in the Makefile.PL (#3)
i think this is the right thing, not quite sure
-rw-r--r-- | inc/MakeMaker.pm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/inc/MakeMaker.pm b/inc/MakeMaker.pm index 1a1eed5..3d31c0d 100644 --- a/inc/MakeMaker.pm +++ b/inc/MakeMaker.pm @@ -7,11 +7,15 @@ around _build_MakeFile_PL_template => sub { my $orig = shift; my $self = shift; my $tmpl = $self->$orig; - return $tmpl . <<'TMPL' -use Devel::CallParser 'callparser1_h'; + my $extra = <<'EXTRA'; +use Devel::CallParser 'callparser1_h', 'callparser_linkable'; open my $fh, '>', 'callparser1.h' or die "Couldn't write to callparser1.h"; $fh->print(callparser1_h); -TMPL +$WriteMakefileArgs{OBJECT} = join(' ', callparser_linkable); +EXTRA + $tmpl =~ s/^(WriteMakefile\()/$extra\n$1/m + or die "Couldn't fix template"; + return $tmpl; }; __PACKAGE__->meta->make_immutable; |