rpms/perl-DBIx-SearchBuilder/FC-4 DBIx-SearchBuilder-1.38-fc4-hacks.diff, NONE, 1.1 .cvsignore, 1.2, 1.3 perl-DBIx-SearchBuilder.spec, 1.2, 1.3 sources, 1.2, 1.3

Ralf Corsépius (corsepiu) fedora-extras-commits at redhat.com
Sun Jan 15 06:24:52 UTC 2006


Author: corsepiu

Update of /cvs/extras/rpms/perl-DBIx-SearchBuilder/FC-4
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21806

Modified Files:
	.cvsignore perl-DBIx-SearchBuilder.spec sources 
Added Files:
	DBIx-SearchBuilder-1.38-fc4-hacks.diff 
Log Message:
tmp

DBIx-SearchBuilder-1.38-fc4-hacks.diff:

--- NEW FILE DBIx-SearchBuilder-1.38-fc4-hacks.diff ---
diff -uNr DBIx-SearchBuilder-1.38.orig/inc/Test/Builder/Module.pm DBIx-SearchBuilder-1.38/inc/Test/Builder/Module.pm
--- DBIx-SearchBuilder-1.38.orig/inc/Test/Builder/Module.pm	1970-01-01 01:00:00.000000000 +0100
+++ DBIx-SearchBuilder-1.38/inc/Test/Builder/Module.pm	2005-10-08 08:56:17.000000000 +0200
@@ -0,0 +1,182 @@
+package Test::Builder::Module;
+
+use Test::Builder;
+
+require Exporter;
+ at ISA = qw(Exporter);
+
+$VERSION = '0.03';
+
+use strict;
+
+# 5.004's Exporter doesn't have export_to_level.
+my $_export_to_level = sub {
+      my $pkg = shift;
+      my $level = shift;
+      (undef) = shift;                  # redundant arg
+      my $callpkg = caller($level);
+      $pkg->export($callpkg, @_);
+};
+
+
+=head1 NAME
+
+Test::Builder::Module - Base class for test modules
+
+=head1 SYNOPSIS
+
+  # Emulates Test::Simple
+  package Your::Module;
+
+  my $CLASS = __PACKAGE__;
+
+  use base 'Test::Builder::Module';
+  @EXPORT = qw(ok);
+
+  sub ok ($;$) {
+      my $tb = $CLASS->builder;
+      return $tb->ok(@_);
+  }
+  
+  1;
+
+
+=head1 DESCRIPTION
+
+This is a superclass for Test::Builder-based modules.  It provides a
+handful of common functionality and a method of getting at the underlying
+Test::Builder object.
+
+
+=head2 Importing
+
+Test::Builder::Module is a subclass of Exporter which means your
+module is also a subclass of Exporter.  @EXPORT, @EXPORT_OK, etc...
+all act normally.
+
+A few methods are provided to do the C<use Your::Module tests => 23> part
+for you.
+
+=head3 import
+
+Test::Builder::Module provides an import() method which acts in the
+same basic way as Test::More's, setting the plan and controling
+exporting of functions and variables.  This allows your module to set
+the plan independent of Test::More.
+
+All arguments passed to import() are passed onto 
+C<< Your::Module->builder->plan() >> with the exception of 
+C<import =>[qw(things to import)]>.
+
+    use Your::Module import => [qw(this that)], tests => 23;
+
+says to import the functions this() and that() as well as set the plan
+to be 23 tests.
+
+import() also sets the exported_to() attribute of your builder to be
+the caller of the import() function.
+
+Additional behaviors can be added to your import() method by overriding
+import_extra().
+
+=cut
+
+sub import {
+    my($class) = shift;
+
+    my $test = $class->builder;
+
+    my $caller = caller;
+
+    $test->exported_to($caller);
+
+    $class->import_extra(\@_);
+    my(@imports) = $class->_strip_imports(\@_);
+
+    $test->plan(@_);
+
+    $class->$_export_to_level(1, $class, @imports);
+}
+
+
+sub _strip_imports {
+    my $class = shift;
+    my $list  = shift;
+
+    my @imports = ();
+    my @other   = ();
+    my $idx = 0;
+    while( $idx <= $#{$list} ) {
+        my $item = $list->[$idx];
+
+        if( defined $item and $item eq 'import' ) {
+            push @imports, @{$list->[$idx+1]};
+            $idx++;
+        }
+        else {
+            push @other, $item;
+        }
+
+        $idx++;
+    }
+
+    @$list = @other;
+
+    return @imports;
+}
+
+
+=head3 import_extra
+
+    Your::Module->import_extra(\@import_args);
+
+import_extra() is called by import().  It provides an opportunity for you
+to add behaviors to your module based on its import list.
+
+Any extra arguments which shouldn't be passed on to plan() should be 
+stripped off by this method.
+
+See Test::More for an example of its use.
+
+B<NOTE> This mechanism is I<VERY ALPHA AND LIKELY TO CHANGE> as it
+feels like a bit of an ugly hack in its current form.
+
+=cut
+
+sub import_extra {}
+
+
+=head2 Builder
+
+Test::Builder::Module provides some methods of getting at the underlying
+Test::Builder object.
+
+=head3 builder
+
+  my $builder = Your::Class->builder;
+
+This method returns the Test::Builder object associated with Your::Class.
+It is not a constructor so you can call it as often as you like.
+
+This is the preferred way to get the Test::Builder object.  You should
+I<not> get it via C<< Test::Builder->new >> as was previously
+recommended.
+
+The object returned by builder() may change at runtime so you should
+call builder() inside each function rather than store it in a global.
+
+  sub ok {
+      my $builder = Your::Class->builder;
+
+      return $builder->ok(@_);
+  }
+
+
+=cut
+
+sub builder {
+    return Test::Builder->new;
+}
+
+
+1;
diff -uNr DBIx-SearchBuilder-1.38.orig/inc/Test/Builder/Tester/Color.pm DBIx-SearchBuilder-1.38/inc/Test/Builder/Tester/Color.pm
--- DBIx-SearchBuilder-1.38.orig/inc/Test/Builder/Tester/Color.pm	1970-01-01 01:00:00.000000000 +0100
+++ DBIx-SearchBuilder-1.38/inc/Test/Builder/Tester/Color.pm	2005-10-08 08:56:17.000000000 +0200
@@ -0,0 +1,50 @@
+package Test::Builder::Tester::Color;
+
+use strict;
+
+require Test::Builder::Tester;
+
+=head1 NAME
+
+Test::Builder::Tester::Color - turn on colour in Test::Builder::Tester
[...4012 lines suppressed...]
+
+This is an extremely simple, extremely basic module for writing tests
+suitable for CPAN modules and other pursuits.  If you wish to do more
+complicated testing, use the Test::More module (a drop-in replacement
+for this one).
+
+The basic unit of Perl testing is the ok.  For each thing you want to
+test your program will print out an "ok" or "not ok" to indicate pass
+or fail.  You do this with the ok() function (see below).
+
+The only other constraint is you must pre-declare how many tests you
+plan to run.  This is in case something goes horribly wrong during the
+test and your test program aborts, or skips a test or whatever.  You
+do this like so:
+
+    use Test::Simple tests => 23;
+
+You must have a plan.
+
+
+=over 4
+
+=item B<ok>
+
+  ok( $foo eq $bar, $name );
+  ok( $foo eq $bar );
+
+ok() is given an expression (in this case C<$foo eq $bar>).  If it's
+true, the test passed.  If it's false, it didn't.  That's about it.
+
+ok() prints out either "ok" or "not ok" along with a test number (it
+keeps track of that for you).
+
+  # This produces "ok 1 - Hell not yet frozen over" (or not ok)
+  ok( get_temperature($hell) > 0, 'Hell not yet frozen over' );
+
+If you provide a $name, that will be printed along with the "ok/not
+ok" to make it easier to find your test when if fails (just search for
+the name).  It also makes it easier for the next guy to understand
+what your test is for.  It's highly recommended you use test names.
+
+All tests are run in scalar context.  So this:
+
+    ok( @stuff, 'I have some stuff' );
+
+will do what you mean (fail if stuff is empty)
+
+=cut
+
+sub ok ($;$) {
+    $CLASS->builder->ok(@_);
+}
+
+
+=back
+
+Test::Simple will start by printing number of tests run in the form
+"1..M" (so "1..5" means you're going to run 5 tests).  This strange
+format lets Test::Harness know how many tests you plan on running in
+case something goes horribly wrong.
+
+If all your tests passed, Test::Simple will exit with zero (which is
+normal).  If anything failed it will exit with how many failed.  If
+you run less (or more) tests than you planned, the missing (or extras)
+will be considered failures.  If no tests were ever run Test::Simple
+will throw a warning and exit with 255.  If the test died, even after
+having successfully completed all its tests, it will still be
+considered a failure and will exit with 255.
+
+So the exit codes are...
+
+    0                   all tests successful
+    255                 test died or all passed but wrong # of tests run
+    any other number    how many failed (including missing or extras)
+
+If you fail more than 254 tests, it will be reported as 254.
+
+This module is by no means trying to be a complete testing system.
+It's just to get you started.  Once you're off the ground its
+recommended you look at L<Test::More>.
+
+
+=head1 EXAMPLE
+
+Here's an example of a simple .t file for the fictional Film module.
+
+    use Test::Simple tests => 5;
+
+    use Film;  # What you're testing.
+
+    my $btaste = Film->new({ Title    => 'Bad Taste',
+                             Director => 'Peter Jackson',
+                             Rating   => 'R',
+                             NumExplodingSheep => 1
+                           });
+    ok( defined($btaste) && ref $btaste eq 'Film,     'new() works' );
+
+    ok( $btaste->Title      eq 'Bad Taste',     'Title() get'    );
+    ok( $btaste->Director   eq 'Peter Jackson', 'Director() get' );
+    ok( $btaste->Rating     eq 'R',             'Rating() get'   );
+    ok( $btaste->NumExplodingSheep == 1,        'NumExplodingSheep() get' );
+
+It will produce output like this:
+
+    1..5
+    ok 1 - new() works
+    ok 2 - Title() get
+    ok 3 - Director() get
+    not ok 4 - Rating() get
+    #   Failed test 'Rating() get'
+    #   in t/film.t at line 14.
+    ok 5 - NumExplodingSheep() get
+    # Looks like you failed 1 tests of 5
+
+Indicating the Film::Rating() method is broken.
+
+
+=head1 CAVEATS
+
+Test::Simple will only report a maximum of 254 failures in its exit
+code.  If this is a problem, you probably have a huge test script.
+Split it into multiple files.  (Otherwise blame the Unix folks for
+using an unsigned short integer as the exit status).
+
+Because VMS's exit codes are much, much different than the rest of the
+universe, and perl does horrible mangling to them that gets in my way,
+it works like this on VMS.
+
+    0     SS$_NORMAL        all tests successful
+    4     SS$_ABORT         something went wrong
+
+Unfortunately, I can't differentiate any further.
+
+
+=head1 NOTES
+
+Test::Simple is B<explicitly> tested all the way back to perl 5.004.
+
+Test::Simple is thread-safe in perl 5.8.0 and up.
+
+=head1 HISTORY
+
+This module was conceived while talking with Tony Bowden in his
+kitchen one night about the problems I was having writing some really
+complicated feature into the new Testing module.  He observed that the
+main problem is not dealing with these edge cases but that people hate
+to write tests B<at all>.  What was needed was a dead simple module
+that took all the hard work out of testing and was really, really easy
+to learn.  Paul Johnson simultaneously had this idea (unfortunately,
+he wasn't in Tony's kitchen).  This is it.
+
+
+=head1 SEE ALSO
+
+=over 4
+
+=item L<Test::More>
+
+More testing functions!  Once you outgrow Test::Simple, look at
+Test::More.  Test::Simple is 100% forward compatible with Test::More
+(i.e. you can just use Test::More instead of Test::Simple in your
+programs and things will still work).
+
+=item L<Test>
+
+The original Perl testing module.
+
+=item L<Test::Unit>
+
+Elaborate unit testing.
+
+=item L<Test::Inline>, L<SelfTest>
+
+Embed tests in your code!
+
+=item L<Test::Harness>
+
+Interprets the output of your test program.
+
+=back
+
+
+=head1 AUTHORS
+
+Idea by Tony Bowden and Paul Johnson, code by Michael G Schwern
+E<lt>schwern at pobox.comE<gt>, wardrobe by Calvin Klein.
+
+
+=head1 COPYRIGHT
+
+Copyright 2001, 2002, 2004 by Michael G Schwern E<lt>schwern at pobox.comE<gt>.
+
+This program is free software; you can redistribute it and/or 
+modify it under the same terms as Perl itself.
+
+See F<http://www.perl.com/perl/misc/Artistic.html>
+
+=cut
+
+1;


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/perl-DBIx-SearchBuilder/FC-4/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- .cvsignore	11 Oct 2005 01:42:57 -0000	1.2
+++ .cvsignore	15 Jan 2006 06:24:51 -0000	1.3
@@ -1 +1 @@
-DBIx-SearchBuilder-1.27.tar.gz
+DBIx-SearchBuilder-1.38.tar.gz


Index: perl-DBIx-SearchBuilder.spec
===================================================================
RCS file: /cvs/extras/rpms/perl-DBIx-SearchBuilder/FC-4/perl-DBIx-SearchBuilder.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- perl-DBIx-SearchBuilder.spec	11 Oct 2005 01:58:08 -0000	1.2
+++ perl-DBIx-SearchBuilder.spec	15 Jan 2006 06:24:51 -0000	1.3
@@ -6,29 +6,36 @@
 #
 
 Name: 		perl-DBIx-SearchBuilder
-Version: 	1.27
-Release: 	3%{?dist}
+Version: 	1.38
+Release: 	1%{?dist}
 Summary: 	Encapsulate SQL queries and rows in simple perl objects
 License: 	GPL or Artistic
 Group: 		Development/Libraries
 URL: 		http://search.cpan.org/dist/DBIx-SearchBuilder/
 Source0: 	http://search.cpan.org/CPAN/authors/id/J/JE/JESSE/DBIx-SearchBuilder-%{version}.tar.gz
+# A private copy of Test::Simple to work around PR #166475. 
+Patch0:         DBIx-SearchBuilder-1.38-fc4-hacks.diff
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 Requires:  	perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
 BuildArch: 	noarch
-BuildRequires: 	perl(Want)
-BuildRequires: 	perl(Cache::Simple::TimedExpiry) >= 0.21
-BuildRequires: 	perl(Class::ReturnValue) >= 0.4
-BuildRequires: 	perl(DBD::SQLite)
+BuildRequires:	perl(Want)
+BuildRequires:	perl(Cache::Simple::TimedExpiry) >= 0.21
+BuildRequires:	perl(Class::ReturnValue) >= 0.4
+BuildRequires:	perl(DBD::SQLite)
+BuildRequires:	perl(DBI)
+BuildRequires:	perl(ExtUtils::AutoInstall) >= 0.49
+# PR #166475
+BuildConflicts: perl(Test::More) >= 0.52
+BuildRequires:	perl(Class::Accessor)
 
 # Improved tests:
 BuildRequires:	perl(Test::Pod)
 
-%if "%version" > "1.27"
-BuildRequires: 	perl(ExtUtils::AutoInstall) >= 0.49
-BuildRequires:	perl(Test::More) >= 0.52
-%endif
+# Optional features
+BuildRequires:	perl(DBIx::DBSchema)
+BuildRequires:	perl(capitalization) >= 0.03
+BuildRequires:	perl(Clone)
 
 %description
 This module provides an object-oriented mechanism for retrieving and
@@ -39,8 +46,13 @@
 chmod -x Changes
 find -name '*.pm' -exec chmod -x {} \;
 
+%patch0 -p1
+
 %build
-%{__perl} Makefile.PL INSTALLDIRS=vendor
+# --skipdeps causes ExtUtils::AutoInstall not to try auto-installing 
+# missing optional features
+%{__perl} Makefile.PL INSTALLDIRS=vendor --skipdeps
+
 make %{?_smp_mflags}
 
 %install
@@ -60,9 +72,7 @@
 %defattr(-,root,root,-)
 # 
 %doc Changes
-%if "%{version}" > "1.27"
 %doc README ROADMAP
-%endif
 %{perl_vendorlib}/DBIx
 %{_mandir}/man3/*
 %exclude %{perl_vendorlib}/DBIx/SearchBuilder/Handle/Oracle*
@@ -84,6 +94,10 @@
 %endif
 
 %changelog
+* Sun Jan 15 2006 Ralf Corsépius <rc040203 at freenet.de> - 1.38-1
+- Update to 1.38.
+- Add a private copy of Test-Simple-0.62 to work around PR #166475.
+
 * Tue Oct 11 2005 Ralf Corsepius <rc040203 at freenet.de> - 1.27-3
 - Spec file cleanup.
 


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/perl-DBIx-SearchBuilder/FC-4/sources,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sources	11 Oct 2005 01:42:58 -0000	1.2
+++ sources	15 Jan 2006 06:24:51 -0000	1.3
@@ -1 +1 @@
-b3bc442e5e447e8a02417c417cff7371  DBIx-SearchBuilder-1.27.tar.gz
+409f13913799709b890583535cd18446  DBIx-SearchBuilder-1.38.tar.gz




More information about the fedora-extras-commits mailing list