diff --git a/MANIFEST b/MANIFEST index 76dee53..8f39c6c 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,6 +1,7 @@ Makefile.PL MANIFEST bin/feedgnuplot +lib/App/feedgnuplot.pm t/manifest.t t/plots.t Changes diff --git a/Makefile.PL b/Makefile.PL index 584be4d..4515beb 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -42,14 +42,30 @@ sub MY::libscan # Don't install any symlinks (i.e. README.pod) return undef if -l $file; + # Don't install any feedgnuplot.pm. This exists only to make CPAN index this + # distribution + return undef if $file =~ /feedgnuplot.pm/; + return $self->SUPER::libscan ($file); } # I want my manpage to go into the man section '1', NOT '1p'. Here I add a # snippet to the end of the generated Makefile to force this +# +# I also generate the feedgnuplot.pm. This exists only to make CPAN index this +# distribution sub MY::postamble { - return "MAN1EXT := 1\n"; + return <<'EOF' +MAN1EXT := 1 +lib/App/feedgnuplot.pm: bin/feedgnuplot + mkdir -p lib/App + echo 'package App::feedgnuplot;' > $@ + cat $^ >> $@ + echo '1;' >> $@ + +dist: lib/App/feedgnuplot.pm +EOF } @@ -65,5 +81,5 @@ WriteMakefile EXE_FILES => [ 'bin/feedgnuplot' ], BUILD_REQUIRES => { 'String::ShellQuote' => 0}, dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, - clean => { FILES => 'feedgnuplot-*' }, + clean => { FILES => 'feedgnuplot-* lib' }, ); diff --git a/t/happy_cpantesters.t b/t/happy_cpantesters.t index 8f7414c..5b02150 100644 --- a/t/happy_cpantesters.t +++ b/t/happy_cpantesters.t @@ -3,6 +3,10 @@ use strict; use Test::More tests => 1; +# Here I use my bogus package (which only exists for CPAN indexing), and make +# sure it works. This test is needless too, it just exists to satisfy CPAN +# checks + BEGIN{ require_ok 'App::feedgnuplot';