[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:02 UTC 2013
The following commit has been merged in the master branch:
commit a9025d1eb6b80ced45ffa04666bdf94668eb91e8
Author: Toby Inkster <mail at tobyinkster.co.uk>
Date: Fri Jul 19 13:51:29 2013 +0100
use Class::Accessor::Grouped's implementation of B::perlstring (ribasushi++)
diff --git a/lib/Devel/TypeTiny/Perl56Compat.pm b/lib/Devel/TypeTiny/Perl56Compat.pm
index bc608bf..ff4161a 100644
--- a/lib/Devel/TypeTiny/Perl56Compat.pm
+++ b/lib/Devel/TypeTiny/Perl56Compat.pm
@@ -5,9 +5,16 @@ our $VERSION = '0.017_01';
#### B doesn't provide perlstring() in 5.6. Monkey patch it.
use B ();
-*B::perlstring = sub {
- sprintf('"%s"', quotemeta($_[0]))
-} unless exists &B::perlstring;
+
+unless (exists &B::perlstring)
+{
+ require Data::Dumper;
+ my $d = 'Data::Dumper'->new([])->Indent(0)->Purity(0)->Pad('')->Useqq(1)->Terse(1)->Freezer('')->Toaster('');
+ *B::perlstring = sub {
+ $d->Values([shift])->Dump
+ };
+}
+
push @B::EXPORT_OK, 'perlstring';
#### Done!
--
libtype-tiny-perl Debian packaging
More information about the Pkg-perl-cvs-commits
mailing list