Replace B::perlstring with our own implmentation thereof
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / _Util.pm
index 5a35ab3..8c2ef12 100644 (file)
@@ -60,6 +60,7 @@ our @EXPORT_OK = qw(
   sigwarn_silencer modver_gt_or_eq
   fail_on_internal_wantarray fail_on_internal_call
   refdesc refcount hrefaddr is_exception
+  perlstring
   UNRESOLVABLE_CONDITION
 );
 
@@ -75,6 +76,8 @@ sub sigwarn_silencer ($) {
   return sub { &$orig_sig_warn unless $_[0] =~ $pattern };
 }
 
+sub perlstring ($) { q{"}. quotemeta( shift ). q{"} };
+
 sub hrefaddr ($) { sprintf '0x%x', &Scalar::Util::refaddr||0 }
 
 sub refdesc ($) {