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
use Carp 'croak';
use Storable 'nfreeze';
use Scalar::Util qw(weaken blessed reftype refaddr);
-use List::Util qw(first);
use Sub::Quote qw(qsub quote_sub);
# Already correctly prototyped: perlbrew exec perl -MStorable -e 'warn prototype \&Storable::dclone'
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 {
my $destruction_registry = {};
sub CLONE {
- $destruction_registry = { map
- { defined $_ ? ( refaddr($_) => $_ ) : () }
- values %$destruction_registry
- };
+ %$destruction_registry = map {
+ (defined $_)
+ ? ( refaddr($_) => $_ )
+ : ()
+ } values %$destruction_registry;
+
+ weaken($_) for values %$destruction_registry;
# Dummy NEXTSTATE ensuring the all temporaries on the stack are garbage
# collected before leaving this scope. Depending on the code above, this
), 'with_stacktrace');
}
- my $mark = [];
- weaken ( $list_ctx_ok_stack_marker = $mark );
+ weaken( $list_ctx_ok_stack_marker = my $mark = [] );
+
$mark;
}
}