Almost every non-toy program will end up lazy-loading these anyway, so move
their require to compile time. This also helps with load-patterns changing
in SQLA and Moo, and failing t/53lean_startup.t on some smokers
# Carp::Skip to the rescue soon
use DBIx::Class::Carp '^DBIx::Class|^DBICTest';
+use B ();
use Carp 'croak';
+use Storable 'nfreeze';
use Scalar::Util qw(weaken blessed reftype);
use List::Util qw(first);
sub refcount ($) {
croak "Expecting a reference" if ! length ref $_[0];
- require B;
# No tempvars - must operate on $_[0], otherwise the pad
# will count as an extra ref
B::svref_2object($_[0])->REFCNT;
}
sub serialize ($) {
- require Storable;
local $Storable::canonical = 1;
- Storable::nfreeze($_[0]);
+ nfreeze($_[0]);
}
sub is_exception ($) {
Scalar::Util
List::Util
+ Storable
Class::Accessor::Grouped
Class::C3::Componentised