From b6f9cf0cd8b90c31a024581d524cf513a5446c93 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 14 Jun 2010 03:21:42 -0500 Subject: update dzil (and other packaging) stuff --- .gitignore | 1 + Changes | 14 +++++----- dist.ini | 5 ++-- lib/Carp/Always/Color.pm | 52 +------------------------------------ lib/Carp/Always/Color/HTML.pm | 18 +------------ lib/Carp/Always/Color/Term.pm | 18 +------------ t/000-load.t | 12 --------- t/001-term.t | 60 ------------------------------------------- t/002-html.t | 51 ------------------------------------ t/003-detect.t | 37 -------------------------- t/004-eval.t | 40 ----------------------------- t/005-object.t | 10 -------- t/01-term.t | 60 +++++++++++++++++++++++++++++++++++++++++++ t/02-html.t | 51 ++++++++++++++++++++++++++++++++++++ t/03-detect.t | 37 ++++++++++++++++++++++++++ t/04-eval.t | 40 +++++++++++++++++++++++++++++ t/05-object.t | 10 ++++++++ weaver.ini | 36 ++++++++++++++++++++++++++ 18 files changed, 248 insertions(+), 304 deletions(-) delete mode 100644 t/000-load.t delete mode 100644 t/001-term.t delete mode 100644 t/002-html.t delete mode 100644 t/003-detect.t delete mode 100644 t/004-eval.t delete mode 100644 t/005-object.t create mode 100644 t/01-term.t create mode 100644 t/02-html.t create mode 100644 t/03-detect.t create mode 100644 t/04-eval.t create mode 100644 t/05-object.t create mode 100644 weaver.ini diff --git a/.gitignore b/.gitignore index c38068c..fdfbe26 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ Makefile.old nytprof.out MANIFEST.bak *.sw[po] +Carp-Always-Color-* diff --git a/Changes b/Changes index b5375ea..9ad894b 100644 --- a/Changes +++ b/Changes @@ -1,10 +1,12 @@ Revision history for Carp::Always::Color -0.03 04/30/2010 - Sigh, stupid packaging (remove stray test.pl from dist) +{{$NEXT}} -0.02 04/30/2010 - Fix some bugs dealing with evals and non-string exceptions +0.03 2010-04-30 + - Sigh, stupid packaging (remove stray test.pl from dist) -0.01 04/30/2010 - Initial release +0.02 2010-04-30 + - Fix some bugs dealing with evals and non-string exceptions + +0.01 2010-04-30 + - Initial release diff --git a/dist.ini b/dist.ini index 2bd5623..644460a 100644 --- a/dist.ini +++ b/dist.ini @@ -1,11 +1,10 @@ name = Carp-Always-Color -version = 0.03 author = Jesse Luehrs license = Perl_5 copyright_holder = Jesse Luehrs -abstract = Carp::Always, but with color -[@Classic] +[@DOY] +dist = Carp-Always-Color [Prereq] Carp::Always = 0 diff --git a/lib/Carp/Always/Color.pm b/lib/Carp/Always/Color.pm index 6aeb61d..a482001 100644 --- a/lib/Carp/Always/Color.pm +++ b/lib/Carp/Always/Color.pm @@ -1,6 +1,7 @@ package Carp::Always::Color; use strict; use warnings; +# ABSTRACT: Carp::Always, but with color BEGIN { if (-t *STDERR) { @@ -11,10 +12,6 @@ BEGIN { } } -=head1 NAME - -Carp::Always::Color - Carp::Always, but with color - =head1 SYNOPSIS use Carp::Always::Color; @@ -32,57 +29,10 @@ messages are being sent to a terminal, it colors them with terminal escape codes, otherwise it colors them with HTML (ideas for more intelligent behavior here are welcome). -=head1 BUGS - -No known bugs. - -Please report any bugs through RT: email -C, or browse to -L. - =head1 SEE ALSO L -=head1 SUPPORT - -You can find this documentation for this module with the perldoc command. - - perldoc Carp::Always::Color - -You can also look for information at: - -=over 4 - -=item * AnnoCPAN: Annotated CPAN documentation - -L - -=item * CPAN Ratings - -L - -=item * RT: CPAN's request tracker - -L - -=item * Search CPAN - -L - -=back - -=head1 AUTHOR - - Jesse Luehrs - -=head1 COPYRIGHT AND LICENSE - -This software is copyright (c) 2010 by Jesse Luehrs. - -This is free software; you can redistribute it and/or modify it under -the same terms as perl itself. - =cut 1; diff --git a/lib/Carp/Always/Color/HTML.pm b/lib/Carp/Always/Color/HTML.pm index 788e69c..3c17d21 100644 --- a/lib/Carp/Always/Color/HTML.pm +++ b/lib/Carp/Always/Color/HTML.pm @@ -2,10 +2,7 @@ package Carp::Always::Color::HTML; use strict; use warnings; use Carp::Always; - -=head1 NAME - -Carp::Always::Color::HTML - Carp::Always, but with HTML color +# ABSTRACT: Carp::Always, but with HTML color =head1 SYNOPSIS @@ -53,17 +50,4 @@ END { @SIG{qw(__DIE__ __WARN__)} = @OLD_SIG{qw(__DIE__ __WARN__)}; } -=head1 AUTHOR - - Jesse Luehrs - -=head1 COPYRIGHT AND LICENSE - -This software is copyright (c) 2010 by Jesse Luehrs. - -This is free software; you can redistribute it and/or modify it under -the same terms as perl itself. - -=cut - 1; diff --git a/lib/Carp/Always/Color/Term.pm b/lib/Carp/Always/Color/Term.pm index 6f5eceb..3b3ce2c 100644 --- a/lib/Carp/Always/Color/Term.pm +++ b/lib/Carp/Always/Color/Term.pm @@ -2,10 +2,7 @@ package Carp::Always::Color::Term; use strict; use warnings; use Carp::Always; - -=head1 NAME - -Carp::Always::Color::Term - Carp::Always, but with terminal color +# ABSTRACT: Carp::Always, but with terminal color =head1 SYNOPSIS @@ -53,17 +50,4 @@ END { @SIG{qw(__DIE__ __WARN__)} = @OLD_SIG{qw(__DIE__ __WARN__)}; } -=head1 AUTHOR - - Jesse Luehrs - -=head1 COPYRIGHT AND LICENSE - -This software is copyright (c) 2010 by Jesse Luehrs. - -This is free software; you can redistribute it and/or modify it under -the same terms as perl itself. - -=cut - 1; diff --git a/t/000-load.t b/t/000-load.t deleted file mode 100644 index 49c3422..0000000 --- a/t/000-load.t +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env perl -use strict; -use warnings; -use Test::More tests => 3; - -package Foo; -::use_ok('Carp::Always::Color') - or ::BAIL_OUT("couldn't load Carp::Always::Color"); -::use_ok('Carp::Always::Color::Term') - or ::BAIL_OUT("couldn't load Carp::Always::Color::Term"); -::use_ok('Carp::Always::Color::HTML') - or ::BAIL_OUT("couldn't load Carp::Always::Color::HTML"); diff --git a/t/001-term.t b/t/001-term.t deleted file mode 100644 index b93af1e..0000000 --- a/t/001-term.t +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env perl -use strict; -use warnings; -use Test::More; -BEGIN { - eval "use IO::Pty::Easy;"; - plan skip_all => "IO::Pty::Easy is required for this test" if $@; - plan tests => 5; -} - -sub output_is { - local $Test::Builder::Level = $Test::Builder::Level + 1; - my ($script, $expected, $desc) = @_; - my $pty = IO::Pty::Easy->new; - $pty->spawn("$^X", "-e", $script); - is($pty->read, $expected, $desc); -} - -output_is(< "IO::Pty::Easy is required for this test" if $@; - plan tests => 4; -} - -sub output_is { - local $Test::Builder::Level = $Test::Builder::Level + 1; - my ($script, $expected, $desc) = @_; - my $pty = IO::Pty::Easy->new; - $pty->spawn("$^X", "-e", $script); - is($pty->read, $expected, $desc); -} - -output_is(<foo at -e line 2\n", - "simple warns work"); - -output_is(<foo at -e line 3\n\tmain::foo() called at -e line 5\n", - "warns with a stacktrace work"); - -output_is(<foo at -e line 2\n", - "simple dies work"); - -output_is(<foo at -e line 3\n\tmain::foo() called at -e line 5\n", - "dies with a stacktrace work"); diff --git a/t/003-detect.t b/t/003-detect.t deleted file mode 100644 index 6c4f7d3..0000000 --- a/t/003-detect.t +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env perl -use strict; -use warnings; -use Test::More; -BEGIN { - eval "use IO::Pty::Easy;"; - plan skip_all => "IO::Pty::Easy is required for this test" if $@; - plan tests => 2; -} - -sub output_is { - local $Test::Builder::Level = $Test::Builder::Level + 1; - my ($script, $expected, $desc) = @_; - my $pty = IO::Pty::Easy->new; - $pty->spawn("$^X", "-e", $script); - is($pty->read, $expected, $desc); -} - -output_is(<', \\\$stderr); - } - use Carp::Always::Color; - warn "foo"; - print \$stderr; -EOF - "foo at -e line 7\n", - "detection works for terminal output"); diff --git a/t/004-eval.t b/t/004-eval.t deleted file mode 100644 index 3500dc0..0000000 --- a/t/004-eval.t +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env perl -use strict; -use warnings; -use Test::More; -BEGIN { - eval "use IO::Pty::Easy;"; - plan skip_all => "IO::Pty::Easy is required for this test" if $@; - plan tests => 2; -} - -sub output_is { - local $Test::Builder::Level = $Test::Builder::Level + 1; - my ($script, $expected, $desc) = @_; - my $pty = IO::Pty::Easy->new; - $pty->spawn("$^X", "-e", $script); - is($pty->read, $expected, $desc); -} - -output_is(< 1; - -use Carp::Always::Color; - -my $err = bless({}, 'My::Error::Class'); -eval { die $err }; -is($@, $err, "exception objects aren't affected"); diff --git a/t/01-term.t b/t/01-term.t new file mode 100644 index 0000000..b93af1e --- /dev/null +++ b/t/01-term.t @@ -0,0 +1,60 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use Test::More; +BEGIN { + eval "use IO::Pty::Easy;"; + plan skip_all => "IO::Pty::Easy is required for this test" if $@; + plan tests => 5; +} + +sub output_is { + local $Test::Builder::Level = $Test::Builder::Level + 1; + my ($script, $expected, $desc) = @_; + my $pty = IO::Pty::Easy->new; + $pty->spawn("$^X", "-e", $script); + is($pty->read, $expected, $desc); +} + +output_is(< "IO::Pty::Easy is required for this test" if $@; + plan tests => 4; +} + +sub output_is { + local $Test::Builder::Level = $Test::Builder::Level + 1; + my ($script, $expected, $desc) = @_; + my $pty = IO::Pty::Easy->new; + $pty->spawn("$^X", "-e", $script); + is($pty->read, $expected, $desc); +} + +output_is(<foo at -e line 2\n", + "simple warns work"); + +output_is(<foo at -e line 3\n\tmain::foo() called at -e line 5\n", + "warns with a stacktrace work"); + +output_is(<foo at -e line 2\n", + "simple dies work"); + +output_is(<foo at -e line 3\n\tmain::foo() called at -e line 5\n", + "dies with a stacktrace work"); diff --git a/t/03-detect.t b/t/03-detect.t new file mode 100644 index 0000000..6c4f7d3 --- /dev/null +++ b/t/03-detect.t @@ -0,0 +1,37 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use Test::More; +BEGIN { + eval "use IO::Pty::Easy;"; + plan skip_all => "IO::Pty::Easy is required for this test" if $@; + plan tests => 2; +} + +sub output_is { + local $Test::Builder::Level = $Test::Builder::Level + 1; + my ($script, $expected, $desc) = @_; + my $pty = IO::Pty::Easy->new; + $pty->spawn("$^X", "-e", $script); + is($pty->read, $expected, $desc); +} + +output_is(<', \\\$stderr); + } + use Carp::Always::Color; + warn "foo"; + print \$stderr; +EOF + "foo at -e line 7\n", + "detection works for terminal output"); diff --git a/t/04-eval.t b/t/04-eval.t new file mode 100644 index 0000000..3500dc0 --- /dev/null +++ b/t/04-eval.t @@ -0,0 +1,40 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use Test::More; +BEGIN { + eval "use IO::Pty::Easy;"; + plan skip_all => "IO::Pty::Easy is required for this test" if $@; + plan tests => 2; +} + +sub output_is { + local $Test::Builder::Level = $Test::Builder::Level + 1; + my ($script, $expected, $desc) = @_; + my $pty = IO::Pty::Easy->new; + $pty->spawn("$^X", "-e", $script); + is($pty->read, $expected, $desc); +} + +output_is(< 1; + +use Carp::Always::Color; + +my $err = bless({}, 'My::Error::Class'); +eval { die $err }; +is($@, $err, "exception objects aren't affected"); diff --git a/weaver.ini b/weaver.ini new file mode 100644 index 0000000..219a165 --- /dev/null +++ b/weaver.ini @@ -0,0 +1,36 @@ +[@CorePrep] + +[Name] +[Version] + +[Region / prelude] + +[Generic / SYNOPSIS] +[Generic / DESCRIPTION] +[Generic / OVERVIEW] + +[Collect / ATTRIBUTES] +command = attr + +[Collect / METHODS] +command = method + +[Collect / FUNCTIONS] +command = func + +[Leftovers] + +[Region / postlude] + +[Template / BUGS] +template = ~/.dzil/pod_templates/bugs.section +main_module_only = 1 + +[SeeAlso] + +[Template / SUPPORT] +template = ~/.dzil/pod_templates/support.section +main_module_only = 1 + +[Authors] +[Legal] -- cgit v1.2.3