r75788 - in /trunk/libtest-mockobject-perl: ./ debian/ debian/patches/ debian/source/ lib/Test/ lib/Test/MockObject/ t/ t/developer/

ghedo-guest at users.alioth.debian.org ghedo-guest at users.alioth.debian.org
Wed Jun 15 17:50:38 UTC 2011


Author: ghedo-guest
Date: Wed Jun 15 17:50:36 2011
New Revision: 75788

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=75788
Log:
* New upstream release
* Remove libmodule-build-perl from B-D (no more used)
* Refresh patch and add DEP3 headers
* Switch to 3.0 (quilt) format
  - Remove quilt from B-D
* Bump debhelper
* Bump Standards-Version to 3.9.2
* Switch to short form dh
* Add libtest-exception-perl and libtest-warn-perl to Depends
* Bump version of libtest-simple-perl in Depends
* Update debian/copyright
  - Update upstream years
  - Add myself to debian/*
  - Switch to DEP5 machine readable format

Added:
    trunk/libtest-mockobject-perl/LICENSE
      - copied unchanged from r75787, branches/upstream/libtest-mockobject-perl/current/LICENSE
    trunk/libtest-mockobject-perl/debian/source/
    trunk/libtest-mockobject-perl/debian/source/format
    trunk/libtest-mockobject-perl/dist.ini
      - copied unchanged from r75787, branches/upstream/libtest-mockobject-perl/current/dist.ini
    trunk/libtest-mockobject-perl/t/debuggingwarnings.t
      - copied unchanged from r75787, branches/upstream/libtest-mockobject-perl/current/t/debuggingwarnings.t
    trunk/libtest-mockobject-perl/t/debuggingwarningsextends.t
      - copied unchanged from r75787, branches/upstream/libtest-mockobject-perl/current/t/debuggingwarningsextends.t
    trunk/libtest-mockobject-perl/t/nodefaultwarnings.t
      - copied unchanged from r75787, branches/upstream/libtest-mockobject-perl/current/t/nodefaultwarnings.t
Removed:
    trunk/libtest-mockobject-perl/Build.PL
    trunk/libtest-mockobject-perl/debian/README.source
    trunk/libtest-mockobject-perl/t/developer/
Modified:
    trunk/libtest-mockobject-perl/Changes
    trunk/libtest-mockobject-perl/MANIFEST
    trunk/libtest-mockobject-perl/META.yml
    trunk/libtest-mockobject-perl/Makefile.PL
    trunk/libtest-mockobject-perl/README
    trunk/libtest-mockobject-perl/debian/changelog
    trunk/libtest-mockobject-perl/debian/compat
    trunk/libtest-mockobject-perl/debian/control
    trunk/libtest-mockobject-perl/debian/copyright
    trunk/libtest-mockobject-perl/debian/patches/pod-fixes-MockObject.pm.diff
    trunk/libtest-mockobject-perl/debian/rules
    trunk/libtest-mockobject-perl/lib/Test/MockObject.pm
    trunk/libtest-mockobject-perl/lib/Test/MockObject/Extends.pm

Modified: trunk/libtest-mockobject-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-mockobject-perl/Changes?rev=75788&op=diff
==============================================================================
--- trunk/libtest-mockobject-perl/Changes (original)
+++ trunk/libtest-mockobject-perl/Changes Wed Jun 15 17:50:36 2011
@@ -1,7 +1,16 @@
 Revision history for Perl extension Test::MockObject.
 
+1.20110612 2011-06-11 23:53:50 America/Los_Angeles
+    - removed Module::Build detritus
+    - improved Test::Warn testing dependency
+
+1.20110606
+    Sun Jun 04 2011
+    - converted to Dist::Zilla
+    - posted to GitHub
+
 1.09
-    Tue May 27 06:11:24 UTC 2008 ($Rev$, $Author$)
+    Tue May 27 06:11:24 UTC 2008
     - removed a buggy workaround for C<no warnings 'redefine';>, now that 5.6.2
       is the baseline
 

Modified: trunk/libtest-mockobject-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-mockobject-perl/MANIFEST?rev=75788&op=diff
==============================================================================
--- trunk/libtest-mockobject-perl/MANIFEST (original)
+++ trunk/libtest-mockobject-perl/MANIFEST Wed Jun 15 17:50:36 2011
@@ -1,17 +1,19 @@
-Build.PL
 Changes
+LICENSE
+MANIFEST
+META.yml
 Makefile.PL
-MANIFEST
+README
+dist.ini
 lib/Test/MockObject.pm
 lib/Test/MockObject/Extends.pm
-README
 t/base.t
 t/bugs.t
 t/debugger.t
+t/debuggingwarnings.t
+t/debuggingwarningsextends.t
+t/extends-bugs.t
 t/extends.t
-t/extends-bugs.t
+t/ignore.t
 t/isa.t
-t/ignore.t
-t/developer/pod.t
-t/developer/pod-coverage.t
-META.yml          Module meta-data (added by MakeMaker)
+t/nodefaultwarnings.t

Modified: trunk/libtest-mockobject-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-mockobject-perl/META.yml?rev=75788&op=diff
==============================================================================
--- trunk/libtest-mockobject-perl/META.yml (original)
+++ trunk/libtest-mockobject-perl/META.yml Wed Jun 15 17:50:36 2011
@@ -1,27 +1,31 @@
 ---
+abstract: 'Perl extension for emulating troublesome interfaces'
+author:
+  - chromatic
+build_requires:
+  Test::Exception: 0
+  Test::More: 0.98
+  Test::Warn: 0.23
+  overload: 0
+  vars: 0
+configure_requires:
+  ExtUtils::MakeMaker: 6.30
+dynamic_config: 0
+generated_by: 'Dist::Zilla version 4.200007, CPAN::Meta::Converter version 2.110930'
+license: perl
+meta-spec:
+  url: http://module-build.sourceforge.net/META-spec-v1.4.html
+  version: 1.4
 name: Test-MockObject
-version: 1.09
-author: []
-abstract: Perl extension for emulating troublesome interfaces
-license: perl
-resources:
-  license: http://dev.perl.org/licenses/
 requires:
-  Scalar::Util: 1.1.4
-  Test::Simple: 0.47
-  UNIVERSAL::can: 1.11
-  UNIVERSAL::isa: 0.06
-  perl: 5.6.2
-build_requires:
-  Test::Exception: ''
-provides:
-  Test::MockObject:
-    file: lib/Test/MockObject.pm
-    version: 1.09
-  Test::MockObject::Extends:
-    file: lib/Test/MockObject/Extends.pm
-    version: 1.09
-generated_by: Module::Build version 0.2808
-meta-spec:
-  url: http://module-build.sourceforge.net/META-spec-v1.2.html
-  version: 1.2
+  CGI: 0
+  Carp: 0
+  Devel::Peek: 0
+  Scalar::Util: 0
+  Test::Builder: 0
+  Test::Exception: 0.31
+  Test::More: 0.98
+  Test::Warn: 0.23
+  UNIVERSAL::can: 1.16
+  UNIVERSAL::isa: 1.03
+version: 1.20110612

Modified: trunk/libtest-mockobject-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-mockobject-perl/Makefile.PL?rev=75788&op=diff
==============================================================================
--- trunk/libtest-mockobject-perl/Makefile.PL (original)
+++ trunk/libtest-mockobject-perl/Makefile.PL Wed Jun 15 17:50:36 2011
@@ -1,21 +1,66 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.03
-use ExtUtils::MakeMaker;
 
-use 5.006_002;
+use strict;
+use warnings;
 
-WriteMakefile
-(
-          'PL_FILES' => {},
-          'INSTALLDIRS' => 'site',
-          'NAME' => 'Test::MockObject',
-          'EXE_FILES' => [],
-          'VERSION_FROM' => 'lib/Test/MockObject.pm',
-          'PREREQ_PM' => {
-                           'Scalar::Util' => '1.1.4',
-                           'Test::Exception' => '',
-                           'UNIVERSAL::isa' => '0.06',
-                           'UNIVERSAL::can' => '1.11',
-                           'Test::Simple' => '0.47'
-                         }
-        )
-;
+
+
+use ExtUtils::MakeMaker 6.30;
+
+
+
+my %WriteMakefileArgs = (
+  'ABSTRACT' => 'Perl extension for emulating troublesome interfaces',
+  'AUTHOR' => 'chromatic',
+  'BUILD_REQUIRES' => {
+    'Test::Exception' => '0',
+    'Test::More' => '0.98',
+    'Test::Warn' => '0.23',
+    'overload' => '0',
+    'vars' => '0'
+  },
+  'CONFIGURE_REQUIRES' => {
+    'ExtUtils::MakeMaker' => '6.30'
+  },
+  'DISTNAME' => 'Test-MockObject',
+  'EXE_FILES' => [],
+  'LICENSE' => 'perl',
+  'NAME' => 'Test::MockObject',
+  'PREREQ_PM' => {
+    'CGI' => '0',
+    'Carp' => '0',
+    'Devel::Peek' => '0',
+    'Scalar::Util' => '0',
+    'Test::Builder' => '0',
+    'Test::Exception' => '0.31',
+    'Test::More' => '0.98',
+    'Test::Warn' => '0.23',
+    'UNIVERSAL::can' => '1.16',
+    'UNIVERSAL::isa' => '1.03'
+  },
+  'VERSION' => '1.20110612',
+  'test' => {
+    'TESTS' => 't/*.t'
+  }
+);
+
+
+unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {
+  my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};
+  my $pp = $WriteMakefileArgs{PREREQ_PM};
+  for my $mod ( keys %$br ) {
+    if ( exists $pp->{$mod} ) {
+      $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod};
+    }
+    else {
+      $pp->{$mod} = $br->{$mod};
+    }
+  }
+}
+
+delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
+  unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
+
+WriteMakefile(%WriteMakefileArgs);
+
+
+

Modified: trunk/libtest-mockobject-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-mockobject-perl/README?rev=75788&op=diff
==============================================================================
--- trunk/libtest-mockobject-perl/README (original)
+++ trunk/libtest-mockobject-perl/README Wed Jun 15 17:50:36 2011
@@ -1,83 +1,13 @@
-Test::MockObject version 1.09
-=============================
 
-* NOTES *
 
-Because you can break this module very badly by using the isa() and can()
-methods as if they were functions, version 1.01 started to use the
-UNIVERSAL::isa and UNIVERSAL::can modules.  They'll do the right thing but
-complain about it so that you can fix the offending code.  These require Perl
-5.6.0 or better.
+This archive contains the distribution Test-MockObject,
+version 1.20110612:
 
-Newer versions of those modules will complain less; see 1.20 of each.
+  Perl extension for emulating troublesome interfaces
 
-If you want to run all of the tests (including the developer tests that check
-the signature and POD coverage), set the environment variable
-PERL_RUN_ALL_TESTS to true.  I don't know why you want to do this though,
-unless you're me.
+This software is copyright (c) 2011 by chromatic at wgz.org.
 
-I removed T::MO::add() as of version 1.0.  I deprecated it a long, long time
-ago.  Also, T::MO::E should handle a few more types of extending now, but
-please report any weirdnesses to http://rt.cpan.org/ for this module if you run
-into trouble.
+This is free software; you can redistribute it and/or modify it under
+the same terms as the Perl 5 programming language system itself.
 
-The documentation of T::MO::E is correct as of version 0.20.  Also, isa() works
-much better in T::MO, thanks to Stevan Little.
 
-You can now skip logging certain mocked methods in T::MO and T::MO::E version 0.15.  Finally!
-
-I've added Test::MockObject:Extends in version 0.14.  This required making
-Test::MockObject a little more subclassable.
-
-As of version 0.12, I've fixed the false positives in called_ok().  Jay Bonci
-found this one and wrote the test case.  Oops.
-
-As of version 0.11, I've fixed a potential infinite loop with a set_series()
-mocked method called in list context.  Yuck.
-
-As of version 0.10, mock objects no longer store their state within the objects
-themselves.  That also means that you can have mock objects that aren't hash
-references. Nifty.
-
-As of version 0.09, method chaining works for mocking methods.  Handy!  Use it!
-
-As of version 0.07, the add() method has been deprecated in favor of mock().
-It continues to work, for backwards compatibility purposes, but you are
-encouraged to migrate to mock().  (Thank you for using the module, though.  :)
-
-Test::MockObject is a highly polymorphic testing object, capable of looking
-like all sorts of objects.  This makes white-box testing much easier, as you
-can concentrate on what the code being tested sends to and receives from the
-mocked object, instead of worrying about faking up your own data.  (Another
-option is not to test difficult things.  Now you have no excuse.)
-
-Please note that it is possible to write highly detailed unit tests that pass
-even when your integration tests may fail.  Testing the pieces individually
-does not excuse you from testing the whole thing together.  I consider this to
-be a feature.
-
-INSTALLATION
-
-To install this module type the following:
-
-   $ perl Build.PL
-   $ perl ./Build
-   $ perl ./Build test
-   # ./Build install
-
-You can also use the Makefile.PL.  I don't.
-
-DEPENDENCIES
-
-This module requires these other modules and libraries:
-
-    Test::Simple version 0.44 or newer (I fixed a bug :)
-    Test::Exception
-    Scalar::Util, without which you have a broken Perl installation post-5.6
-    UNIVERSAL::isa and UNIVERSAL::can (always the latest versions)
-
-COPYRIGHT AND LICENCE
-
-Copyright (c) 2002 - 2008 chromatic. All rights reserved.  This program is free
-software; you can redistribute it and/or modify it under the same terms as Perl
-5.10.x itself.

Modified: trunk/libtest-mockobject-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-mockobject-perl/debian/changelog?rev=75788&op=diff
==============================================================================
--- trunk/libtest-mockobject-perl/debian/changelog (original)
+++ trunk/libtest-mockobject-perl/debian/changelog Wed Jun 15 17:50:36 2011
@@ -1,8 +1,6 @@
-libtest-mockobject-perl (1.09-2) UNRELEASED; urgency=low
+libtest-mockobject-perl (1.20110612-1) UNRELEASED; urgency=low
 
   [ gregor herrmann ]
-  * Add debian/README.source to document quilt usage, as required by
-    Debian Policy since 3.8.0.
   * debian/control: Changed: Switched Vcs-Browser field to ViewSVN
     (source stanza).
   * debian/control: Added: ${misc:Depends} to Depends: field.
@@ -15,7 +13,23 @@
   [ gregor herrmann ]
   * Revert unannounced changes to META.yml.
 
- -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org>  Thu, 26 Jun 2008 13:32:51 +0200
+  [ Alessandro Ghedini ]
+  * New upstream release
+  * Remove libmodule-build-perl from B-D (no more used)
+  * Refresh patch and add DEP3 headers
+  * Switch to 3.0 (quilt) format
+    - Remove quilt from B-D
+  * Bump debhelper
+  * Bump Standards-Version to 3.9.2
+  * Switch to short form dh
+  * Add libtest-exception-perl and libtest-warn-perl to Depends
+  * Bump version of libtest-simple-perl in Depends
+  * Update debian/copyright
+    - Update upstream years
+    - Add myself to debian/*
+    - Switch to DEP5 machine readable format
+
+ -- Alessandro Ghedini <al3xbio at gmail.com>  Wed, 15 Jun 2011 19:27:30 +0200
 
 libtest-mockobject-perl (1.09-1) unstable; urgency=low
 
@@ -28,7 +42,7 @@
   * debian/rules: used rules.simple from debhelper 7
   * added patch for fixing POD pages (closes: #466450)
   * debian/copyright: added copyright info
-  
+
   [ gregor herrmann ]
   * debian/rules: delete /usr/lib/perl5 only if it exists.
 

Modified: trunk/libtest-mockobject-perl/debian/compat
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-mockobject-perl/debian/compat?rev=75788&op=diff
==============================================================================
--- trunk/libtest-mockobject-perl/debian/compat (original)
+++ trunk/libtest-mockobject-perl/debian/compat Wed Jun 15 17:50:36 2011
@@ -1,1 +1,1 @@
-7
+8

Modified: trunk/libtest-mockobject-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-mockobject-perl/debian/control?rev=75788&op=diff
==============================================================================
--- trunk/libtest-mockobject-perl/debian/control (original)
+++ trunk/libtest-mockobject-perl/debian/control Wed Jun 15 17:50:36 2011
@@ -4,18 +4,27 @@
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: Jay Bonci <jaybonci at debian.org>,
  Krzysztof Krzyżaniak (eloy) <eloy at debian.org>
-Build-Depends: debhelper (>= 7), libmodule-build-perl, quilt
-Build-Depends-Indep: perl, libtest-exception-perl, libtest-warn-perl, libuniversal-isa-perl, libuniversal-can-perl
-Standards-Version: 3.8.0
+Build-Depends: debhelper (>= 8)
+Build-Depends-Indep: perl,
+ libtest-exception-perl,
+ libtest-warn-perl,
+ libuniversal-isa-perl,
+ libuniversal-can-perl
+Standards-Version: 3.9.2
 Homepage: http://search.cpan.org/dist/Test-MockObject/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libtest-mockobject-perl/
 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libtest-mockobject-perl/
 
 Package: libtest-mockobject-perl
 Architecture: all
-Depends: ${misc:Depends}, ${perl:Depends}, libtest-simple-perl, libuniversal-isa-perl, libuniversal-can-perl
-Description: Perl extension for emulating troublesome interfaces 
- Test::MockObject allows you to control interfaces for writing 
+Depends: ${misc:Depends}, ${perl:Depends},
+ libtest-exception-perl,
+ perl (>= 5.14) | libtest-simple-perl (>= 0.98),
+ libtest-warn-perl,
+ libuniversal-isa-perl,
+ libuniversal-can-perl
+Description: Perl extension for emulating troublesome interfaces
+ Test::MockObject allows you to control interfaces for writing
  tests in perl. It can emulate interfaces that you normally
  would use (such as a database or other external items).
  You don't have to recreate the functionality, but simply mimic

Modified: trunk/libtest-mockobject-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-mockobject-perl/debian/copyright?rev=75788&op=diff
==============================================================================
--- trunk/libtest-mockobject-perl/debian/copyright (original)
+++ trunk/libtest-mockobject-perl/debian/copyright Wed Jun 15 17:50:36 2011
@@ -1,24 +1,30 @@
-This package was debianized by Jay Bonci <jay at bonci.com> on
-Sun,  4 Aug 2002 12:24:57 -0400.
+Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135
+Maintainer: chromatic <chromatic at wgz.org>
+Source: http://search.cpan.org/dist/Test-MockObject/
+Name: Test-MockObject
 
-It was downloaded from http://search.cpan.org/dist/Test-MockObject
+Files: *
+Copyright: 2002-2011, chromatic <chromatic at wgz.org>
+License: Artistic or GPL-1+
 
-Upstream Author: Chromatic <chromatic at wgz.org>
+Files: debian/*
+Copyright: 2002, Jay Bonci <jay at bonci.com>
+ 2011, Alessandro Ghedini <al3xbio at gmail.com>
+License: Artistic or GPL-1+
 
-Copyright (c) 2002 - 2008 chromatic. All rights reserved.
+License: Artistic
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the Artistic License, which comes with Perl.
+ .
+ On Debian systems, the complete text of the Artistic License can be
+ found in `/usr/share/common-licenses/Artistic'.
 
-This program is free software, you can redistribute it and/or modify it under
-the same terms as Perl itself.
+License: GPL-1+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 1, or (at your option)
+ any later version.
+ .
+ On Debian systems, the complete text of version 1 of the General Public
+ License can be found in `/usr/share/common-licenses/GPL-1'.
 
-Perl is distributed under licenses:
-
-    a) the GNU General Public License as published by the Free Software
-       Foundation; either version 1, or (at your option) any later
-       version, or
-  
-    b) the "Artistic License" which comes with Perl.
-  
-    On Debian GNU/Linux systems, the complete text of the GNU General
-    Public License can be found in /usr/share/common-licenses/GPL' and
-    the Artistic Licence in /usr/share/common-licenses/Artistic'.
-

Modified: trunk/libtest-mockobject-perl/debian/patches/pod-fixes-MockObject.pm.diff
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-mockobject-perl/debian/patches/pod-fixes-MockObject.pm.diff?rev=75788&op=diff
==============================================================================
--- trunk/libtest-mockobject-perl/debian/patches/pod-fixes-MockObject.pm.diff (original)
+++ trunk/libtest-mockobject-perl/debian/patches/pod-fixes-MockObject.pm.diff Wed Jun 15 17:50:36 2011
@@ -1,6 +1,11 @@
+Description: Wrap line in POD, so that the C<> is not prematurely closed by
+ the "=>". See #466450
+Origin: vendor
+Forwarded: no
+Author: Krzysztof Krzyżaniak (eloy)
 --- a/lib/Test/MockObject.pm
 +++ b/lib/Test/MockObject.pm
-@@ -558,8 +558,8 @@ before the actual module has a chance to
+@@ -579,8 +579,8 @@
  before a use or require or place it before a C<use_ok()> or C<require_ok()>
  call.
  

Modified: trunk/libtest-mockobject-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-mockobject-perl/debian/rules?rev=75788&op=diff
==============================================================================
--- trunk/libtest-mockobject-perl/debian/rules (original)
+++ trunk/libtest-mockobject-perl/debian/rules Wed Jun 15 17:50:36 2011
@@ -1,23 +1,4 @@
 #!/usr/bin/make -f
 
-include /usr/share/quilt/quilt.make
-
-build: build-stamp
-build-stamp: $(QUILT_STAMPFN)
-	dh build
-	touch build-stamp
-
-clean: unpatch
-	dh clean
-
-install: build install-stamp
-install-stamp:
-	dh install
-	touch install-stamp
-
-binary-arch: install
-
-binary-indep: install
-	dh binary-indep
-
-binary: binary-arch binary-indep
+%:
+	dh $@

Added: trunk/libtest-mockobject-perl/debian/source/format
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-mockobject-perl/debian/source/format?rev=75788&op=file
==============================================================================
--- trunk/libtest-mockobject-perl/debian/source/format (added)
+++ trunk/libtest-mockobject-perl/debian/source/format Wed Jun 15 17:50:36 2011
@@ -1,0 +1,1 @@
+3.0 (quilt)

Modified: trunk/libtest-mockobject-perl/lib/Test/MockObject.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-mockobject-perl/lib/Test/MockObject.pm?rev=75788&op=diff
==============================================================================
--- trunk/libtest-mockobject-perl/lib/Test/MockObject.pm (original)
+++ trunk/libtest-mockobject-perl/lib/Test/MockObject.pm Wed Jun 15 17:50:36 2011
@@ -1,14 +1,20 @@
 package Test::MockObject;
+BEGIN {
+  $Test::MockObject::VERSION = '1.20110612';
+}
 
 use strict;
 use warnings;
 
-use vars qw( $VERSION $AUTOLOAD );
-$VERSION = '1.09';
-
 use Scalar::Util qw( blessed refaddr reftype weaken );
-use UNIVERSAL::isa;
-use UNIVERSAL::can;
+
+sub import
+{
+    my $self = shift;
+    return unless grep /^-debug/, @_;
+    eval "use UNIVERSAL::isa 'verbose'";
+    eval "use UNIVERSAL::can '-always_warn'";
+}
 
 use Test::Builder;
 
@@ -203,6 +209,8 @@
 
 sub AUTOLOAD
 {
+    our $AUTOLOAD;
+
     my $self = shift;
     my $sub;
     {
@@ -451,7 +459,7 @@
   ok( $mock->somemethod() );
 
   $mock->set_true( 'veritas')
-         ->set_false( 'ficta' )
+       ->set_false( 'ficta' )
        ->set_series( 'amicae', 'Sunny', 'Kylie', 'Bella' );
 
 =head1 DESCRIPTION
@@ -468,21 +476,34 @@
 interfaces with very little code.  You don't have to reimplement the behavior,
 just the input and the output.
 
-=head2 IMPORTANT CAVEAT FOR TESTERS
-
-Please note that it is possible to write highly detailed unit tests that pass
-even when your integration tests may fail.  Testing the pieces individually
-does not excuse you from testing the whole thing together.  I consider this to
-be a feature.
-
-In cases where you only need to mock one or two pieces of an existing module,
-consider L<Test::MockObject::Extends> instead.
+=head2 IMPORTANT CAVEATS
+
+Before you go wild with your testing powers, consider three caveats:
+
+=over 4
+
+=item * It is possible to write highly detailed unit tests that pass even when
+your integration tests may fail.  Testing the pieces individually does not
+excuse you from testing the whole thing together.
+
+=item * In cases where you only need to mock one or two pieces of an existing
+module, consider L<Test::MockObject::Extends> instead.
+
+=item * If the code under testing produces strange errors about type checks,
+pass the C<-debug> flag when using C<Test::MockObject> or
+C<Test::MockObject::Extends>. This will load both L<UNIVERSAL::isa> and
+L<UNIVERSAL::can> to perform additional debugging on the incorrect use of both
+methods from the L<UNIVERSAL> package. (This behavior used to be active by
+default, but that was, however correct, probably a burden to onerous for the
+CPAN.)
+
+=back
 
 =head2 EXPORT
 
-None by default.  Maybe the Test::Builder accessories, in a future version.
-
-=head2 FUNCTIONS
+None.
+
+=head2 METHODS
 
 The most important thing a Mock Object can do is to conform sufficiently to an
 interface.  For example, if you're testing something that relies on CGI.pm, you
@@ -533,7 +554,7 @@
 
 will print a helpful warning message.  Please note that methods are only added
 to a single object at a time and not the class.  (There is no small similarity
-to the Self programming language or the Class::Prototyped module.)
+to the Self programming language or the L<Class::Prototyped> module.)
 
 This method forms the basis for most of Test::MockObject's testing goodness.
 
@@ -544,7 +565,7 @@
 
 =item * C<fake_module(I<module name>), [ I<subname> => I<coderef>, ... ]
 
-B<Note:> this method will likely become a separate module in the near future.
+B<Note:> See L<Test::MockModule> for an alternate (and better) approach.
 
 Lies to Perl that it has already loaded a named module.  This is handy when
 providing a mockup of a real module if you'd like to prevent the actual module
@@ -558,8 +579,8 @@
 before a use or require or place it before a C<use_ok()> or C<require_ok()>
 call.
 
-You can optionally add functions to the mocked module by passing them as name
-=> coderef pairs to C<fake_module()>.  This is handy if you want to test an
+You can optionally add functions to the mocked module by passing them as
+name => coderef pairs to C<fake_module()>.  This is handy if you want to test an
 C<import()>:
 
     my $import;
@@ -873,7 +894,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (c) 2002 - 2008 by chromatic E<lt>chromatic at wgz dot orgE<gt>.
+Copyright (c) 2002 - 2011 by chromatic E<lt>chromatic at wgz dot orgE<gt>.
 
 This program is free software; you can use, modify, and redistribute it under
 the same terms as Perl 5.10.x itself.

Modified: trunk/libtest-mockobject-perl/lib/Test/MockObject/Extends.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-mockobject-perl/lib/Test/MockObject/Extends.pm?rev=75788&op=diff
==============================================================================
--- trunk/libtest-mockobject-perl/lib/Test/MockObject/Extends.pm (original)
+++ trunk/libtest-mockobject-perl/lib/Test/MockObject/Extends.pm Wed Jun 15 17:50:36 2011
@@ -1,15 +1,22 @@
 package Test::MockObject::Extends;
+BEGIN {
+  $Test::MockObject::Extends::VERSION = '1.20110612';
+}
 
 use strict;
 use warnings;
 
 use Test::MockObject;
 
+sub import
+{
+    my $self = shift;
+    eval "use Test::MockObject";
+    Test::MockObject->import( @_ );
+}
+
 use Devel::Peek  'CvGV';
 use Scalar::Util 'blessed';
-
-use vars qw( $VERSION $AUTOLOAD );
-$VERSION = '1.09';
 
 sub new
 {
@@ -107,6 +114,8 @@
 
     sub
     {
+        our $AUTOLOAD;
+
         my $method = substr( $AUTOLOAD, rindex( $AUTOLOAD, ':' ) +1 );
         return if $method eq 'DESTROY';
 
@@ -313,5 +322,5 @@
 
 =head1 COPYRIGHT
 
-Copyright (c) 2004 - 2008, chromatic.  All rights reserved.  You may use,
+Copyright (c) 2004 - 2011, chromatic.  All rights reserved.  You may use,
 modify, and distribute this module under the same terms as Perl 5.10




More information about the Pkg-perl-cvs-commits mailing list