[feedgnuplot] 02/02: cleared up the CPAN indexing situation

Dima Kogan dima at secretsauce.net
Wed Dec 4 10:31:04 UTC 2013


This is an automated email from the git hooks/post-receive script.

dkogan-guest pushed a commit to branch cpanindexing
in repository feedgnuplot.

commit cae085ae49efeb18cd2afa6d55842a1733b4c969
Author: Dima Kogan <dima at secretsauce.net>
Date:   Fri Nov 22 12:57:47 2013 -0800

    cleared up the CPAN indexing situation
    
    1. generating bogus feedgnuplot.pm module. It's just a 'package' statement and
       the source. The source is there to get the POD
    
    2. comments
---
 MANIFEST              |  1 +
 Makefile.PL           | 20 ++++++++++++++++++--
 t/happy_cpantesters.t |  4 ++++
 3 files changed, 23 insertions(+), 2 deletions(-)

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';
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/feedgnuplot.git



More information about the debian-science-commits mailing list