r50811 - in /trunk/libtest-nowarnings-perl: ./ debian/ lib/Test/ lib/Test/NoWarnings/ t/
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Tue Jan 12 17:50:38 UTC 2010
Author: jawnsy-guest
Date: Tue Jan 12 17:50:31 2010
New Revision: 50811
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=50811
Log:
Updates dependencies, no need for upload
IGNORE-VERSION: 1.00-1
* New upstream release
Added:
trunk/libtest-nowarnings-perl/Changes
- copied unchanged from r50802, branches/upstream/libtest-nowarnings-perl/current/Changes
trunk/libtest-nowarnings-perl/LICENSE
- copied unchanged from r50802, branches/upstream/libtest-nowarnings-perl/current/LICENSE
trunk/libtest-nowarnings-perl/t/01_none.t
- copied unchanged from r50802, branches/upstream/libtest-nowarnings-perl/current/t/01_none.t
trunk/libtest-nowarnings-perl/t/02_end.t
- copied unchanged from r50802, branches/upstream/libtest-nowarnings-perl/current/t/02_end.t
trunk/libtest-nowarnings-perl/t/03_no_tests.t
- copied unchanged from r50802, branches/upstream/libtest-nowarnings-perl/current/t/03_no_tests.t
trunk/libtest-nowarnings-perl/t/04_no_end.t
- copied unchanged from r50802, branches/upstream/libtest-nowarnings-perl/current/t/04_no_end.t
trunk/libtest-nowarnings-perl/t/05_fork.t
- copied unchanged from r50802, branches/upstream/libtest-nowarnings-perl/current/t/05_fork.t
trunk/libtest-nowarnings-perl/t/97_meta.t
- copied unchanged from r50802, branches/upstream/libtest-nowarnings-perl/current/t/97_meta.t
trunk/libtest-nowarnings-perl/t/98_pod.t
- copied unchanged from r50802, branches/upstream/libtest-nowarnings-perl/current/t/98_pod.t
trunk/libtest-nowarnings-perl/t/99_pmv.t
- copied unchanged from r50802, branches/upstream/libtest-nowarnings-perl/current/t/99_pmv.t
Removed:
trunk/libtest-nowarnings-perl/CHANGES
trunk/libtest-nowarnings-perl/LGPL
trunk/libtest-nowarnings-perl/t/end.t
trunk/libtest-nowarnings-perl/t/fork.t
trunk/libtest-nowarnings-perl/t/no_end.t
trunk/libtest-nowarnings-perl/t/no_tests.t
trunk/libtest-nowarnings-perl/t/none.t
Modified:
trunk/libtest-nowarnings-perl/MANIFEST
trunk/libtest-nowarnings-perl/META.yml
trunk/libtest-nowarnings-perl/Makefile.PL
trunk/libtest-nowarnings-perl/README
trunk/libtest-nowarnings-perl/debian/changelog
trunk/libtest-nowarnings-perl/lib/Test/NoWarnings.pm
trunk/libtest-nowarnings-perl/lib/Test/NoWarnings/Warning.pm
Modified: trunk/libtest-nowarnings-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-nowarnings-perl/MANIFEST?rev=50811&op=diff
==============================================================================
--- trunk/libtest-nowarnings-perl/MANIFEST (original)
+++ trunk/libtest-nowarnings-perl/MANIFEST Tue Jan 12 17:50:31 2010
@@ -1,13 +1,16 @@
-LGPL
-README
-CHANGES
-MANIFEST This list of files
-Makefile.PL
+Changes
lib/Test/NoWarnings.pm
lib/Test/NoWarnings/Warning.pm
-t/end.t
-t/fork.t
-t/no_end.t
-t/no_tests.t
-t/none.t
+LICENSE
+Makefile.PL
+MANIFEST This list of files
+README
+t/01_none.t
+t/02_end.t
+t/03_no_tests.t
+t/04_no_end.t
+t/05_fork.t
+t/97_meta.t
+t/98_pod.t
+t/99_pmv.t
META.yml Module meta-data (added by MakeMaker)
Modified: trunk/libtest-nowarnings-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-nowarnings-perl/META.yml?rev=50811&op=diff
==============================================================================
--- trunk/libtest-nowarnings-perl/META.yml (original)
+++ trunk/libtest-nowarnings-perl/META.yml Tue Jan 12 17:50:31 2010
@@ -1,11 +1,27 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
-name: Test-NoWarnings
-version: 0.084
-version_from: ./lib/Test/NoWarnings.pm
-installdirs: site
+--- #YAML:1.0
+name: Test-NoWarnings
+version: 1.00
+abstract: Make sure you didn't emit any warnings while testing
+author:
+ - Fergal Daly <fergal at esatclear.ie>
+license: perl
+distribution_type: module
+configure_requires:
+ ExtUtils::MakeMaker: 0
+build_requires:
+ ExtUtils::MakeMaker: 0
requires:
- Test::Tester: 0.103
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.30_01
+ perl: 5.006
+ Test::Builder: 0.86
+ Test::More: 0.47
+ Test::Tester: 0.107
+resources:
+ repository: http://svn.ali.as/cpan/trunk/Config-Tiny
+no_index:
+ directory:
+ - t
+ - inc
+generated_by: ExtUtils::MakeMaker version 6.50
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
Modified: trunk/libtest-nowarnings-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-nowarnings-perl/Makefile.PL?rev=50811&op=diff
==============================================================================
--- trunk/libtest-nowarnings-perl/Makefile.PL (original)
+++ trunk/libtest-nowarnings-perl/Makefile.PL Tue Jan 12 17:50:31 2010
@@ -1,28 +1,47 @@
-# $Header: $
-
use strict;
-
+BEGIN {
+ require 5.004;
+}
use ExtUtils::MakeMaker;
-my $module = "Test::NoWarnings";
-my $file_base = $module;
-$file_base =~ s/::/\//g;
-$file_base = "./lib/$file_base";
-my $pm_file = "$file_base.pm";
-my $pod_file = "$file_base.pod";
+WriteMakefile1(
+ NAME => 'Test::NoWarnings',
+ ABSTRACT => "Make sure you didn't emit any warnings while testing",
+ VERSION_FROM => 'lib/Test/NoWarnings.pm',
+ AUTHOR => 'Fergal Daly <fergal at esatclear.ie>',
+ LICENSE => 'perl',
+ MIN_PERL_VERSION => '5.006',
+ BUILD_REQUIRES => {
+ 'Test::More' => '0.47',
+ 'Test::Builder' => '0.86',
+ },
+ PREREQ_PM => {
+ 'Test::Tester' => '0.107',
+ },
+ META_MERGE => {
+ resources => {
+ repository => 'http://svn.ali.as/cpan/trunk/Config-Tiny',
+ },
+ },
+);
-my $doc_file = -e $pod_file ? $pod_file : $pm_file;
+# Written by Alexandr Ciornii, version 0.20. Added by eumm-upgrade.
+sub WriteMakefile1 {
+ my %params = @_;
+ my $eumm_version = $ExtUtils::MakeMaker::VERSION;
+ $eumm_version = eval $eumm_version;
+ die "License not specified" if not exists $params{LICENSE};
+ if ($params{BUILD_REQUIRES}) { #and $eumm_version < 6.5503
+ #Should be modified in future when EUMM will
+ #correctly support BUILD_REQUIRES.
+ #EUMM 6.5502 has problems with BUILD_REQUIRES
+ $params{PREREQ_PM}={ %{$params{PREREQ_PM} || {}} , %{$params{BUILD_REQUIRES}} };
+ delete $params{BUILD_REQUIRES};
+ }
+ delete $params{MIN_PERL_VERSION} if $eumm_version < 6.48;
+ delete $params{META_MERGE} if $eumm_version < 6.46;
+ delete $params{LICENSE} if $eumm_version < 6.31;
+ delete $params{AUTHOR} if $] < 5.005;
-(my $dir = $module) =~ s/::/-/g;
-
-WriteMakefile(
- AUTHOR => 'Fergal Daly <fergal at esatclear.ie>',
- NAME => $module,
- VERSION_FROM => $pm_file,
- PREREQ_PM => {
- 'Test::Tester' => 0.103
- },
- dist => {
- PREOP=> "rm -f README; pod2text -80 < $doc_file > README; cp -f README $dir-\$(VERSION); "
- }
-);
+ WriteMakefile(%params);
+}
Modified: trunk/libtest-nowarnings-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-nowarnings-perl/README?rev=50811&op=diff
==============================================================================
--- trunk/libtest-nowarnings-perl/README (original)
+++ trunk/libtest-nowarnings-perl/README Tue Jan 12 17:50:31 2010
@@ -18,50 +18,52 @@
use Test::NoWarnings;
DESCRIPTION
- In general, your tests shouldn't produce warnings. This modules causes any
- warnings to be captured and stored. It automatically adds an extra test that
- will run when your script ends to check that there were no warnings. If
- there were any warings, the test will give a "not ok" and diagnostics of
- where, when and what the warning was, including a stack trace of what was
- going on when the it occurred.
+ In general, your tests shouldn't produce warnings. This modules causes
+ any warnings to be captured and stored. It automatically adds an extra
+ test that will run when your script ends to check that there were no
+ warnings. If there were any warings, the test will give a "not ok" and
+ diagnostics of where, when and what the warning was, including a stack
+ trace of what was going on when the it occurred.
- If some of your tests are supposed to produce warnings then you should be
- capturing and checking them with Test::Warn, that way Test::NoWarnings will
- not see them and so not complain.
+ If some of your tests are supposed to produce warnings then you should
+ be capturing and checking them with Test::Warn, that way
+ Test::NoWarnings will not see them and so not complain.
- The test is run by an END block in Test::NoWarnings. It will not be run when
- any forked children exit.
+ The test is run by an END block in Test::NoWarnings. It will not be run
+ when any forked children exit.
USAGE
- Simply by using the module, you automatically get an extra test at the end
- of your script that checks that no warnings were emitted. So just stick
+ Simply by using the module, you automatically get an extra test at the
+ end of your script that checks that no warnings were emitted. So just
+ stick
use Test::NoWarnings
at the top of your script and continue as normal.
- If you want more control you can invoke the test manually at any time with
- "had_no_warnings()".
+ If you want more control you can invoke the test manually at any time
+ with "had_no_warnings()".
- The warnings your test has generated so far are stored in an array. You can
- look inside and clear this whenever you want with "warnings()" and
- "clear_warnings()", however, if you are doing this sort of thing then you
- probably want to use Test::Warn in combination with Test::NoWarnings.
+ The warnings your test has generated so far are stored in an array. You
+ can look inside and clear this whenever you want with "warnings()" and
+ "clear_warnings()", however, if you are doing this sort of thing then
+ you probably want to use Test::Warn in combination with
+ Test::NoWarnings.
USE vs REQUIRE
You will almost always want to do
use Test::NoWarnings
- If you do a "require" rather than a "use", then there will be no automatic
- test at the end of your script.
+ If you do a "require" rather than a "use", then there will be no
+ automatic test at the end of your script.
OUTPUT
- If warning is captured during your test then the details will output as part
- of the diagnostics. You will get:
+ If warning is captured during your test then the details will output as
+ part of the diagnostics. You will get:
- o the number and name of the test that was executed just before the warning
- (if no test had been executed these will be 0 and '')
+ o the number and name of the test that was executed just before the
+ warning (if no test had been executed these will be 0 and '')
o the message passed to "warn",
@@ -71,17 +73,18 @@
EXPORTABLE FUNCTIONS
had_no_warnings()
This checks that there have been warnings emitted by your test scripts.
- Usually you will not call this explicitly as it is called automatically when
- your script finishes.
+ Usually you will not call this explicitly as it is called automatically
+ when your script finishes.
clear_warnings()
- This will clear the array of warnings that have been captured. If the array
- is empty then a call to "had_no_warnings()" will produce a pass result.
+ This will clear the array of warnings that have been captured. If the
+ array is empty then a call to "had_no_warnings()" will produce a pass
+ result.
warnings()
- This will return the array of warnings captured so far. Each element of this
- array is an object containing information about the warning. The following
- methods are available on these object.
+ This will return the array of warnings captured so far. Each element of
+ this array is an object containing information about the warning. The
+ following methods are available on these object.
* $warn->getMessage
@@ -94,20 +97,21 @@
* $warn->getTrace
- Get a stack trace object generated by the Devel::StackTrace module. This
- will return undef if Devel::StackTrace is not installed.
+ Get a stack trace object generated by the Devel::StackTrace module.
+ This will return undef if Devel::StackTrace is not installed.
* $warn->getTest
- Get the number of the test that executed before the warning was emitted.
+ Get the number of the test that executed before the warning was
+ emitted.
* $warn->getTestName
Get the name of the test that executed before the warning was emitted.
PITFALLS
- When counting your tests for the plan, don't forget to include the test that
- runs automatically when your script ends.
+ When counting your tests for the plan, don't forget to include the test
+ that runs automatically when your script ends.
BUGS
None that I know of.
@@ -119,13 +123,15 @@
Test::Builder, Test::Warn
AUTHOR
- Written by Fergal Daly <fergal at esatclear.ie>.
+ Fergal Daly <fergal at esatclear.ie>
COPYRIGHT
- Copyright 2003 by Fergal Daly <fergal at esatclear.ie>.
+ Copyright 2003 - 2007 Fergal Daly.
- This program is free software and comes with no warranty. It is distributed
- under the LGPL license
+ Some parts copyright 2010 Adam Kennedy.
+
+ This program is free software and comes with no warranty. It is
+ distributed under the LGPL license
See the file LGPL included in this distribution or
http://www.fsf.org/licenses/licenses.html.
Modified: trunk/libtest-nowarnings-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-nowarnings-perl/debian/changelog?rev=50811&op=diff
==============================================================================
--- trunk/libtest-nowarnings-perl/debian/changelog (original)
+++ trunk/libtest-nowarnings-perl/debian/changelog Tue Jan 12 17:50:31 2010
@@ -1,4 +1,10 @@
-libtest-nowarnings-perl (0.084-2) UNRELEASED; urgency=low
+libtest-nowarnings-perl (1.00-1) UNRELEASED; urgency=low
+
+ Updates dependencies, no need for upload
+ IGNORE-VERSION: 1.00-1
+
+ [ Jonathan Yu ]
+ * New upstream release
[ gregor herrmann ]
* debian/control: Changed: Switched Vcs-Browser field to ViewSVN
@@ -11,7 +17,7 @@
[ Nathan Handler ]
* debian/watch: Update to ignore development releases.
- -- Ryan Niebur <ryanryan52 at gmail.com> Wed, 08 Apr 2009 19:08:49 -0700
+ -- Jonathan Yu <jawnsy at cpan.org> Tue, 12 Jan 2010 10:47:38 -0500
libtest-nowarnings-perl (0.084-1) unstable; urgency=low
Modified: trunk/libtest-nowarnings-perl/lib/Test/NoWarnings.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-nowarnings-perl/lib/Test/NoWarnings.pm?rev=50811&op=diff
==============================================================================
--- trunk/libtest-nowarnings-perl/lib/Test/NoWarnings.pm (original)
+++ trunk/libtest-nowarnings-perl/lib/Test/NoWarnings.pm Tue Jan 12 17:50:31 2010
@@ -1,40 +1,32 @@
+package Test::NoWarnings;
+
+use 5.006;
use strict;
use warnings;
-
-package Test::NoWarnings;
-
+use Carp;
+use Exporter ();
use Test::Builder;
-
use Test::NoWarnings::Warning;
+
+use vars qw( $VERSION @EXPORT_OK @ISA $do_end_test );
+BEGIN {
+ $VERSION = '1.00';
+ @ISA = 'Exporter';
+ @EXPORT_OK = qw(
+ clear_warnings had_no_warnings warnings
+ );
+}
my $Test = Test::Builder->new;
my $PID = $$;
-
-use Carp;
-
-use vars qw(
- $VERSION @EXPORT_OK @ISA $do_end_test
-);
-
-$VERSION = '0.084';
-
-require Exporter;
- at ISA = qw( Exporter );
-
- at EXPORT_OK = qw(
- clear_warnings had_no_warnings warnings
-);
-
my @warnings;
$SIG{__WARN__} = make_catcher(\@warnings);
$do_end_test = 0;
-sub import
-{
+sub import {
$do_end_test = 1;
-
goto &Exporter::import;
}
@@ -45,12 +37,10 @@
had_no_warnings() if $do_end_test;
}
-sub make_warning
-{
- local $SIG{__WARN__};
-
- my $msg = shift;
-
+sub make_warning {
+ local $SIG{__WARN__};
+
+ my $msg = shift;
my $warning = Test::NoWarnings::Warning->new;
$warning->setMessage($msg);
@@ -65,12 +55,10 @@
return $warning;
}
-sub make_catcher
-{
- # this make a subroutine which can be used in $SIG{__WARN__}
- # it takes one argument, a ref to an array
- # it will push the details of the warning onto the end of the array.
-
+# this make a subroutine which can be used in $SIG{__WARN__}
+# it takes one argument, a ref to an array
+# it will push the details of the warning onto the end of the array.
+sub make_catcher {
my $array = shift;
return sub {
@@ -84,8 +72,7 @@
};
}
-sub had_no_warnings
-{
+sub had_no_warnings {
return 0 if $$ != $PID;
local $SIG{__WARN__};
@@ -93,15 +80,12 @@
my $ok;
my $diag;
- if (@warnings == 0)
- {
+ if ( @warnings == 0 ) {
$ok = 1;
- }
- else
- {
+ } else {
$ok = 0;
$diag = "There were ". at warnings." warning(s)\n";
- $diag .= join("----------\n", map { $_->toString } @warnings);
+ $diag .= join "----------\n", map { $_->toString } @warnings;
}
$Test->ok($ok, $name) || $Test->diag($diag);
@@ -109,23 +93,19 @@
return $ok;
}
-sub clear_warnings
-{
+sub clear_warnings {
local $SIG{__WARN__};
@warnings = ();
}
-sub warnings
-{
+sub warnings {
local $SIG{__WARN__};
return @warnings;
}
-sub builder
-{
- local $SIG{__WARN__};
- if (@_)
- {
+sub builder {
+ local $SIG{__WARN__};
+ if ( @_ ) {
$Test = shift;
}
return $Test;
@@ -134,6 +114,8 @@
1;
__END__
+
+=pod
=head1 NAME
@@ -295,11 +277,13 @@
=head1 AUTHOR
-Written by Fergal Daly <fergal at esatclear.ie>.
+Fergal Daly E<lt>fergal at esatclear.ieE<gt>
=head1 COPYRIGHT
-Copyright 2003 by Fergal Daly E<lt>fergal at esatclear.ieE<gt>.
+Copyright 2003 - 2007 Fergal Daly.
+
+Some parts copyright 2010 Adam Kennedy.
This program is free software and comes with no warranty. It is distributed
under the LGPL license
Modified: trunk/libtest-nowarnings-perl/lib/Test/NoWarnings/Warning.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-nowarnings-perl/lib/Test/NoWarnings/Warning.pm?rev=50811&op=diff
==============================================================================
--- trunk/libtest-nowarnings-perl/lib/Test/NoWarnings/Warning.pm (original)
+++ trunk/libtest-nowarnings-perl/lib/Test/NoWarnings/Warning.pm Tue Jan 12 17:50:31 2010
@@ -1,102 +1,73 @@
-use strict;
-
package Test::NoWarnings::Warning;
+use strict;
use Carp;
+
+use vars qw{$VERSION};
+BEGIN {
+ $VERSION = '1.00';
+}
my $has_st = eval "require Devel::StackTrace" || 0;
-sub new
-{
- my $pkg = shift;
-
- my %args = @_;
-
- my $self = bless \%args, $pkg;
-
- return $self;
+sub new {
+ my $class = shift;
+ bless { @_ }, $class;
}
-sub getTrace
-{
+sub getTrace {
my $self = shift;
-
return $self->{Trace};
}
-sub fillTrace
-{
+sub fillTrace {
my $self = shift;
$self->{Trace} = Devel::StackTrace->new(
ignore_class => [__PACKAGE__, @_],
) if $has_st;
}
-sub getCarp
-{
- my $self = shift;
-
- return $self->{Carp};
+sub getCarp {
+ $_[0]->{Carp};
}
-sub fillCarp
-{
+sub fillCarp {
my $self = shift;
-
- my $msg = shift;
-
- $Carp::Internal{__PACKAGE__.""}++;
+ my $msg = shift;
+ $Carp::Internal{ __PACKAGE__ . "" }++;
local $Carp::CarpLevel = $Carp::CarpLevel + 1;
$self->{Carp} = Carp::longmess($msg);
- $Carp::Internal{__PACKAGE__.""}--;
+ $Carp::Internal{ __PACKAGE__ . "" }--;
}
-sub getMessage
-{
- my $self = shift;
-
- return $self->{Message};
+sub getMessage {
+ $_[0]->{Message};
}
-sub setMessage
-{
- my $self = shift;
-
- $self->{Message} = shift;
+sub setMessage {
+ $_[0]->{Message} = $_[1];
}
-sub fillTest
-{
- my $self = shift;
-
- my $builder = shift;
-
- my $prev_test = $builder->current_test;
- $self->{Test} = $prev_test;
-
- my @tests = $builder->details;
+sub fillTest {
+ my $self = shift;
+ my $builder = shift;
+ my $prev_test = $builder->current_test;
+ $self->{Test} = $prev_test;
+ my @tests = $builder->details;
my $prev_test_name = $prev_test ? $tests[$prev_test - 1]->{name} : "";
- $self->{TestName} = $prev_test_name;
+ $self->{TestName} = $prev_test_name;
}
-sub getTest
-{
- my $self = shift;
-
- return $self->{Test};
+sub getTest {
+ $_[0]->{Test};
}
-sub getTestName
-{
- my $self = shift;
-
- return $self->{TestName};
+sub getTestName {
+ $_[0]->{TestName};
}
-sub toString
-{
+sub toString {
my $self = shift;
-
return <<EOM;
Previous test $self->{Test} '$self->{TestName}'
$self->{Carp}
More information about the Pkg-perl-cvs-commits
mailing list