Permalink
Browse files

update distribution packaging

  • Loading branch information...
1 parent e181cfa commit d4835555512944ce527cb6267876886c2ced55ee @xdg xdg committed Dec 11, 2008
Showing with 593 additions and 797 deletions.
  1. +33 −100 Build.PL
  2. +14 −4 INSTALL
  3. +201 −383 LICENSE
  4. +13 −5 MANIFEST
  5. +12 −8 MANIFEST.SKIP
  6. +11 −9 META.yml
  7. +4 −24 Makefile.PL
  8. +41 −59 README
  9. +9 −7 Todo
  10. 0 {scripts → bin}/ptee
  11. +62 −0 inc/Module/Build/WikiDoc.pm
  12. +47 −106 lib/Tee.pm
  13. +38 −60 lib/Tee.pod
  14. +0 −10 t/98_pod.t
  15. +0 −22 t/99_pod-coverage.t
  16. +15 −0 xt/critic.t
  17. +20 −0 xt/perlcriticrc
  18. +29 −0 xt/pod-coverage.t
  19. +13 −0 xt/pod-format.t
  20. +21 −0 xt/spelling.t
  21. +10 −0 xt/stopwords.txt
View
133 Build.PL
@@ -1,100 +1,33 @@
-use strict;
-use Module::Build;
-use File::Spec;
-
-my $class = Module::Build->subclass(
- class => "Module::Build::WikiDoc",
- code => <<'SUBCLASS', );
-
- sub ACTION_code {
- my $self = shift;
- $self->SUPER::ACTION_code;
- $self->depends_on('share');
- }
-
- sub ACTION_share {
- my $self = shift;
- my $blib = $self->blib;
- my @dist_names = split "/-/", $self->dist_name;
- my $autodir = File::Spec->catdir($blib, 'lib', 'auto', @dist_names);
- File::Path::mkpath( $autodir );
- for my $f ( @{ $self->rscan_dir( 'scripts', '.' ) } ) {
- next if $f eq 'scripts';
- my $to = File::Spec->abs2rel( $f, 'scripts' );
- $self->copy_if_modified(
- from => $f,
- to => File::Spec->catfile( $autodir, $to ),
- verbose => 1
- );
- }
- }
-
- sub ACTION_wikidoc {
- my $self = shift;
- eval "use Pod::WikiDoc";
- if ( $@ eq '' ) {
- my $parser = Pod::WikiDoc->new( {
- comment_blocks => 1,
- keywords => { VERSION => $self->dist_version },
- });
- for my $src ( keys %{ $self->find_pm_files() } ) {
- (my $tgt = $src) =~ s{\.pm$}{.pod};
- $parser->filter( {
- input => $src,
- output => $tgt,
- });
- print "Creating $tgt\n";
- $tgt =~ s{\\}{/}g;
- $self->_add_to_manifest( 'MANIFEST', $tgt );
- }
- }
- else {
- warn "Pod::WikiDoc not available. Skipping wikidoc.\n";
- }
- }
-
- sub ACTION_test {
- my $self = shift;
- my $missing_pod;
- for my $src ( keys %{ $self->find_pm_files() } ) {
- (my $tgt = $src) =~ s{\.pm$}{.pod};
- $missing_pod = 1 if ! -e $tgt;
- }
- if ( $missing_pod ) {
- $self->depends_on('wikidoc');
- $self->depends_on('build');
- }
- $self->SUPER::ACTION_test;
- }
-
- sub ACTION_testpod {
- my $self = shift;
- $self->depends_on('wikidoc');
- $self->SUPER::ACTION_testpod;
- }
-
- sub ACTION_distdir {
- my $self = shift;
- $self->depends_on('wikidoc');
- $self->SUPER::ACTION_distdir;
- }
-
-SUBCLASS
-
-$class->new(
- module_name => 'Tee',
- dist_author => 'David A. Golden <dagolden@cpan.org>',
- license => 'perl',
- create_readme => 1,
-# create_makefile_pl => 'traditional',
- requires => {
- # module requirements here
- 'File::Basename' => 0,
- 'File::Spec' => 0,
- 'Getopt::Long' => 2.32,
- 'IPC::Run3' => 0.033,
- 'Probe::Perl' => 0,
- 'Test::More' => 0.45, # thread-safe
- },
- script_files => [ 'scripts/ptee' ],
-)->create_build_script;
+# Copyright (c) 2008 by David Golden. All rights reserved.
+# Licensed under Apache License, Version 2.0 (the "License").
+# You may not use this file except in compliance with the License.
+# A copy of the License was distributed with this file or you may obtain a
+# copy of the License from http://www.apache.org/licenses/LICENSE-2.0
+
+use 5.006;
+use strict;
+use warnings;
+use lib 'inc';
+eval "require Pod::WikiDoc";
+my $class = $@ ? "Module::Build" : "Module::Build::WikiDoc";
+eval "require $class";
+my $build = $class->new(
+ module_name => 'Tee',
+ dist_author => 'David Golden <dagolden@cpan.org>',
+ license => 'apache',
+ create_readme => 1,
+ create_makefile_pl => 'traditional',
+ requires => {
+ 'perl' => '5.006',
+ },
+ build_requires => {
+ 'Test::More' => 0.47,
+ },
+ meta_add => {
+ no_index => {
+ directory => [ qw/ examples inc t /],
+ }
+ },
+);
+$build->create_build_script;
+
View
18 INSTALL
@@ -1,18 +1,28 @@
+# Copyright (c) 2008 by David Golden. All rights reserved.
+# Licensed under Apache License, Version 2.0 (the "License").
+# You may not use this file except in compliance with the License.
+# A copy of the License was distributed with this file or you may obtain a
+# copy of the License from http://www.apache.org/licenses/LICENSE-2.0
+
INSTALLATION
-If Module::Build is installed (preferred):
+This distribution may be installed via one of the following
+methods:
+
+
+1. If Build.PL exists and Module::Build is installed:
perl Build.PL
perl Build
perl Build test
perl Build install
-Otherwise, using a Makefile:
+2. If Makefile.PL exists:
perl Makefile.PL
make
make test
make install
-If you are on a windows box you should use 'dmake' or 'nmake' rather than
-'make'.
+If you are on a Windows machine you should use
+'nmake' or 'dmake' rather than 'make'.
Oops, something went wrong.

0 comments on commit d483555

Please sign in to comment.