r13764 - in /branches/upstream/libtest-deep-perl/current: CHANGES META.yml lib/Test/Deep.pm lib/Test/Deep.pod lib/Test/Deep/RegexpRef.pm t/deep_utils.t

hanska-guest at users.alioth.debian.org hanska-guest at users.alioth.debian.org
Mon Jan 28 08:31:42 UTC 2008


Author: hanska-guest
Date: Mon Jan 28 08:31:42 2008
New Revision: 13764

URL: http://svn.debian.org/wsvn/?sc=1&rev=13764
Log:
[svn-upgrade] Integrating new upstream version, libtest-deep-perl (0.100)

Modified:
    branches/upstream/libtest-deep-perl/current/CHANGES
    branches/upstream/libtest-deep-perl/current/META.yml
    branches/upstream/libtest-deep-perl/current/lib/Test/Deep.pm
    branches/upstream/libtest-deep-perl/current/lib/Test/Deep.pod
    branches/upstream/libtest-deep-perl/current/lib/Test/Deep/RegexpRef.pm
    branches/upstream/libtest-deep-perl/current/t/deep_utils.t

Modified: branches/upstream/libtest-deep-perl/current/CHANGES
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-deep-perl/current/CHANGES?rev=13764&op=diff
==============================================================================
--- branches/upstream/libtest-deep-perl/current/CHANGES (original)
+++ branches/upstream/libtest-deep-perl/current/CHANGES Mon Jan 28 08:31:42 2008
@@ -1,3 +1,8 @@
+0.100
+
+Apply patch from Andreas Koenig (ANDK) to cope with Perl 5.11's new
+REGEXP objects.
+
 0.099
 
 Don't explode on perl's that don't have weakrefs. If they're not

Modified: branches/upstream/libtest-deep-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-deep-perl/current/META.yml?rev=13764&op=diff
==============================================================================
--- branches/upstream/libtest-deep-perl/current/META.yml (original)
+++ branches/upstream/libtest-deep-perl/current/META.yml Mon Jan 28 08:31:42 2008
@@ -1,7 +1,7 @@
 # http://module-build.sourceforge.net/META-spec.html
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         Test-Deep
-version:      0.099
+version:      0.100
 version_from: ./lib/Test/Deep.pm
 installdirs:  perl
 requires:

Modified: branches/upstream/libtest-deep-perl/current/lib/Test/Deep.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-deep-perl/current/lib/Test/Deep.pm?rev=13764&op=diff
==============================================================================
--- branches/upstream/libtest-deep-perl/current/lib/Test/Deep.pm (original)
+++ branches/upstream/libtest-deep-perl/current/lib/Test/Deep.pm Mon Jan 28 08:31:42 2008
@@ -25,7 +25,7 @@
 	$Snobby $Expects $DNE $DNE_ADDR $Shallow
 );
 
-$VERSION = '0.099';
+$VERSION = '0.100';
 
 require Exporter;
 @ISA = qw( Exporter );
@@ -333,7 +333,7 @@
 		{
 			$cmp = scalref($data);
 		}
-		elsif($base eq 'Regexp')
+		elsif($] <= 5.010 ? ($base eq 'Regexp') : ($base eq 'REGEXP'))
 		{
 			$cmp = regexpref($data);
 		}
@@ -357,11 +357,13 @@
 		$blessed = defined($blessed) ? $blessed : "";
 		my $reftype = Scalar::Util::reftype($val);
 
-		if ($blessed eq "Regexp" and $reftype eq "SCALAR")
-		{
-			$reftype = "Regexp"
-		}
-
+
+		if ($] <= 5.010) {
+			if ($blessed eq "Regexp" and $reftype eq "SCALAR")
+			{
+				$reftype = "Regexp"
+			}
+		}
 		return ($blessed, $reftype);
 	}
 	else

Modified: branches/upstream/libtest-deep-perl/current/lib/Test/Deep.pod
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-deep-perl/current/lib/Test/Deep.pod?rev=13764&op=diff
==============================================================================
--- branches/upstream/libtest-deep-perl/current/lib/Test/Deep.pod (original)
+++ branches/upstream/libtest-deep-perl/current/lib/Test/Deep.pod Mon Jan 28 08:31:42 2008
@@ -839,7 +839,7 @@
 thing.
 
 Test::Deep exports lots of SC constructors, to make it easy for you to use
-them in you tests scripts. For example is C<re("hello")> is just a handy way
+them in your test scripts. For example is C<re("hello")> is just a handy way
 of creating a Test::Deep::Regexp object that will match any string containing
 "hello". So
 
@@ -847,7 +847,7 @@
 
 will check C<'a' eq 'a'>, C<'b' eq 'b'> but when it comes to comparing
 C<'hello world'> and C<re("^hello")> it will see that
-$expected_v is an SC and so will pass control to the Test::Deep::Regex class
+$expected_v is an SC and so will pass control to the Test::Deep::Regexp class
 by do something like C<$expected_v->descend($got_v)>. The C<descend()>
 method should just return true or false.
 

Modified: branches/upstream/libtest-deep-perl/current/lib/Test/Deep/RegexpRef.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-deep-perl/current/lib/Test/Deep/RegexpRef.pm?rev=13764&op=diff
==============================================================================
--- branches/upstream/libtest-deep-perl/current/lib/Test/Deep/RegexpRef.pm (original)
+++ branches/upstream/libtest-deep-perl/current/lib/Test/Deep/RegexpRef.pm Mon Jan 28 08:31:42 2008
@@ -22,8 +22,12 @@
 
 	my $exp = $self->{val};
 
-	return 0 unless $self->test_class($got, "Regexp");
-	return 0 unless $self->test_reftype($got, "SCALAR");
+	if ($] <= 5.010) {
+		return 0 unless $self->test_class($got, "Regexp");
+		return 0 unless $self->test_reftype($got, "SCALAR");
+	} else {
+		return 0 unless $self->test_reftype($got, "REGEXP");
+	}
 
 	return Test::Deep::descend($got, Test::Deep::regexprefonly($exp));
 }

Modified: branches/upstream/libtest-deep-perl/current/t/deep_utils.t
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-deep-perl/current/t/deep_utils.t?rev=13764&op=diff
==============================================================================
--- branches/upstream/libtest-deep-perl/current/t/deep_utils.t (original)
+++ branches/upstream/libtest-deep-perl/current/t/deep_utils.t Mon Jan 28 08:31:42 2008
@@ -28,5 +28,5 @@
 
 	my ($class, $base) = class_base($a);
 	is($class, "Regexp", "class_base class regexp");
-	is($base, "Regexp", "class_base base regexp");
+	is($base, ($] <= 5.010 ? "Regexp" : "REGEXP"), "class_base base regexp");
 }




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