[SCM] libtype-tiny-perl Debian packaging branch, master, updated. debian/0.016-1-48-ga7f6748

Toby Inkster mail at tobyinkster.co.uk
Mon Jul 29 12:55:00 UTC 2013


The following commit has been merged in the master branch:
commit 6128d34b460aac77a69a028afb123eb2a0a26b7c
Author: Toby Inkster <mail at tobyinkster.co.uk>
Date:   Fri Jul 19 10:19:08 2013 +0100

    Perl 5.6 is missing B::perlstring() function

diff --git a/lib/Devel/TypeTiny/Perl56Compat.pm b/lib/Devel/TypeTiny/Perl56Compat.pm
new file mode 100644
index 0000000..76b7432
--- /dev/null
+++ b/lib/Devel/TypeTiny/Perl56Compat.pm
@@ -0,0 +1,12 @@
+#### B doesn't provide perlstring() in 5.6. Monkey patch it.
+
+use B ();
+
+sub B::perlstring
+{
+	sprintf('"%s"', quotemeta($_[0]))
+}
+
+push @B::EXPORT_OK, 'perlstring';
+
+1;
diff --git a/lib/Type/Exception/Assertion.pm b/lib/Type/Exception/Assertion.pm
index dade9f3..877093d 100644
--- a/lib/Type/Exception/Assertion.pm
+++ b/lib/Type/Exception/Assertion.pm
@@ -5,6 +5,10 @@ use strict;
 use warnings;
 
 BEGIN {
+	if ($] < 5.008) { require Devel::TypeTiny::Perl56Compat };
+}
+
+BEGIN {
 	$Type::Exception::Assertion::AUTHORITY = 'cpan:TOBYINK';
 	$Type::Exception::Assertion::VERSION   = '0.017_01';
 }
diff --git a/lib/Type/Params.pm b/lib/Type/Params.pm
index 80457b8..3cfd306 100644
--- a/lib/Type/Params.pm
+++ b/lib/Type/Params.pm
@@ -5,6 +5,10 @@ use strict;
 use warnings;
 
 BEGIN {
+	if ($] < 5.008) { require Devel::TypeTiny::Perl56Compat };
+}
+
+BEGIN {
 	$Type::Params::AUTHORITY = 'cpan:TOBYINK';
 	$Type::Params::VERSION   = '0.017_01';
 }
diff --git a/lib/Type/Tiny.pm b/lib/Type/Tiny.pm
index 7ce8f7b..94897c7 100644
--- a/lib/Type/Tiny.pm
+++ b/lib/Type/Tiny.pm
@@ -5,6 +5,10 @@ use strict;
 use warnings;
 
 BEGIN {
+	if ($] < 5.008) { require Devel::TypeTiny::Perl56Compat };
+}
+
+BEGIN {
 	$Type::Tiny::AUTHORITY = 'cpan:TOBYINK';
 	$Type::Tiny::VERSION   = '0.017_01';
 }
diff --git a/lib/Type/Tiny/Class.pm b/lib/Type/Tiny/Class.pm
index ad3ba0f..45ba93e 100644
--- a/lib/Type/Tiny/Class.pm
+++ b/lib/Type/Tiny/Class.pm
@@ -5,6 +5,10 @@ use strict;
 use warnings;
 
 BEGIN {
+	if ($] < 5.008) { require Devel::TypeTiny::Perl56Compat };
+}
+
+BEGIN {
 	$Type::Tiny::Class::AUTHORITY = 'cpan:TOBYINK';
 	$Type::Tiny::Class::VERSION   = '0.017_01';
 }
diff --git a/lib/Types/Standard.pm b/lib/Types/Standard.pm
index fbda9d4..38ca505 100644
--- a/lib/Types/Standard.pm
+++ b/lib/Types/Standard.pm
@@ -1,9 +1,14 @@
 package Types::Standard;
 
+use 5.006001
 use strict;
 use warnings;
 
 BEGIN {
+	if ($] < 5.008) { require Devel::TypeTiny::Perl56Compat };
+}
+
+BEGIN {
 	$Types::Standard::AUTHORITY = 'cpan:TOBYINK';
 	$Types::Standard::VERSION   = '0.017_01';
 }

-- 
libtype-tiny-perl Debian packaging



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