From: Peter Rabbitson <ribasushi@cpan.org>
Date: Tue, 9 Aug 2011 04:33:54 +0000 (+0200)
Subject: Autogen README, add gitignore
X-Git-Tag: v1.001_001~16
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4f07ebe65283f3f933c7600f64de8ddfa2da6db8;p=p5sagit%2FClass-C3-Componentised.git

Autogen README, add gitignore
---

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..7580005
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,14 @@
+Build
+Build.bat
+MANIFEST
+MANIFEST.bak
+META.*
+MYMETA.*
+Makefile
+Makefile.old
+README
+_build/
+blib/
+inc/
+pm_to_blib
+.*.sw?
diff --git a/Makefile.PL b/Makefile.PL
index 6c6119b..f01e2af 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -24,4 +24,16 @@ requires  'Class::C3' => '0.20';
 
 resources repository => 'git://git.shadowcat.co.uk/p5sagit/Class-C3-Componentised.git';
 
+if ($Module::Install::AUTHOR) {
+
+  print "Regenerating README\n";
+  system('pod2text lib/Class/C3/Componentised.pm > README');
+
+  if (-f 'MANIFEST') {
+    print "Removing MANIFEST\n";
+    unlink 'MANIFEST';
+  }
+}
+
+
 WriteAll;
diff --git a/README b/README
deleted file mode 100644
index 72e5e94..0000000
--- a/README
+++ /dev/null
@@ -1,15 +0,0 @@
-README for Class::C3::Componentised
-
-Description here
-
-INSTALL
-
-        perl Build.PL
-        ./Build
-        ./Build test
-        ./Build install
-
-LICENSE
-
-This program is free software; you can redistribute it and/or modify it
-under the same terms as Perl itself.