ingydotnet/inline-pm — pull request #29 by neomorphic (2014-07-10 20:36:41+00:00)
Title: Prevent adding non .pm modules to the Makefile.

Dear Maintainers,

First, thanks for the great module and the new release which allows one to have multiple modules in an inline distribution. I had my own work around for that, but look forward to using the newest version. The problem I am having is that the “shotgun approach” is trying to compile files that it shouldn’t. I have the following layout
```
lib/Bio/HMM/Logo.c
lib/Bio/HMM/Logo.pm
lib/Bio/HMM/Logo.typemap
lib/Bio/HMM/Logo/Fonts/LICENSE.txt
lib/Bio/HMM/Logo/Fonts/SourceCodePro-Bold.ttf
lib/Bio/HMM/Logo/Fonts/SourceCodePro-SemiBold.ttf
```
This creates the following section of the Makefile after I run make.

```
# --- MakeMaker inline section:

Bio-HMM-Logo.inl: $(TO_INST_PM)
$(PERL) -Mblib -MInline=NOISY,_INSTALL_ -MBio::HMM::Logo -e"Inline::satisfy_makefile_dep({API => {modinlname => 'Bio-HMM-Logo.inl', module => 'Bio::HMM::Logo'}});" 0.03 $(INST_ARCHLIB)
Bio-HMM-Logo-Fonts-SourceCodePro-Bold.inl: $(TO_INST_PM)
$(PERL) -Mblib -MInline=NOISY,_INSTALL_ -MBio::HMM::Logo::Fonts::SourceCodePro-Bold -e"Inline::satisfy_makefile_dep({API => {modinlname => 'Bio-HMM-Logo-Fonts-SourceCodePro-Bold.inl', module => 'Bio::HMM::Logo::Fonts::SourceCodePro-Bold'}});" 0.03 $(INST_ARCHLIB)
Bio-HMM-Logo-Fonts-SourceCodePro-Semibold.inl: $(TO_INST_PM)
$(PERL) -Mblib -MInline=NOISY,_INSTALL_ -MBio::HMM::Logo::Fonts::SourceCodePro-Semibold -e"Inline::satisfy_makefile_dep({API => {modinlname => 'Bio-HMM-Logo-Fonts-SourceCodePro-Semibold.inl', module => 'Bio::HMM::Logo::Fonts::SourceCodePro-Semibold'}});" 0.03 $(INST_ARCHLIB)
Bio-HMM-Logo-Fonts-LICENSE.inl: $(TO_INST_PM)
$(PERL) -Mblib -MInline=NOISY,_INSTALL_ -MBio::HMM::Logo::Fonts::LICENSE -e"Inline::satisfy_makefile_dep({API => {modinlname => 'Bio-HMM-Logo-Fonts-LICENSE.inl', module => 'Bio::HMM::Logo::Fonts::LICENSE'}});" 0.03 $(INST_ARCHLIB)
Bio-HMM-Logo.inl: $(TO_INST_PM)
$(PERL) -Mblib -MInline=NOISY,_INSTALL_ -MBio::HMM::Logo -e"Inline::satisfy_makefile_dep({API => {modinlname => 'Bio-HMM-Logo.inl', module => 'Bio::HMM::Logo'}});" 0.03 $(INST_ARCHLIB)
Bio-HMM-Logo.inl: $(TO_INST_PM)
$(PERL) -Mblib -MInline=NOISY,_INSTALL_ -MBio::HMM::Logo -e"Inline::satisfy_makefile_dep({API => {modinlname => 'Bio-HMM-Logo.inl', module => 'Bio::HMM::Logo'}});" 0.03 $(INST_ARCHLIB)

pure_all :: Bio-HMM-Logo.inl Bio-HMM-Logo-Fonts-SourceCodePro-Bold.inl Bio-HMM-Logo-Fonts-SourceCodePro-Semibold.inl Bio-HMM-Logo-Fonts-LICENSE.inl Bio-HMM-Logo.inl Bio-HMM-Logo.inl

# The End is here.
```

You might chastise me for placing those non-module files in there in the first place, but that is where they are and it was working in release 0.55. So would it be possible to only bother trying to inline files that end in the .pm extension?

I have created a simple patch that I think does the trick.

Thanks for your time.