Bring back constants excised in 08a8d8f1. FML.
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / _Util.pm
index 60a4815..09fdfe9 100644 (file)
@@ -52,6 +52,24 @@ BEGIN {
     require mro;
     constant->import( OLD_MRO => 0 );
   }
+
+  # Both of these are no longer used for anything. However bring
+  # them back after they were purged in 08a8d8f1, as there appear
+  # to be outfits with *COPY PASTED* pieces of lib/DBIx/Class/Storage/*
+  # in their production codebases. There is no point in breaking these
+  # if whatever they used actually continues to work
+  my $warned;
+  my $sigh = sub {
+
+    require Carp;
+    my $cluck = "The @{[ (caller(1))[3] ]} constant is no more - adjust your code" . Carp::longmess();
+
+    warn $cluck unless $warned->{$cluck}++;
+
+    0;
+  };
+  sub DBICTEST () { &$sigh }
+  sub PEEPEENESS () { &$sigh }
 }
 
 # FIXME - this is not supposed to be here
@@ -121,12 +139,12 @@ sub serialize ($) {
   nfreeze($_[0]);
 }
 
-my ($dd_obj, $dump_str);
+my $dd_obj;
 sub dump_value ($) {
   local $Data::Dumper::Indent = 1
     unless defined $Data::Dumper::Indent;
 
-  $dump_str = (
+  my $dump_str = (
     $dd_obj
       ||=
     do {