Revision history for DBIx::Class
+ * Misc
+ - Depend on newer Moo, to benefit from a safer runtime (RT#93004)
+
0.082810 2014-10-25 13:58 (UTC)
* Fixes
- Fix incorrect collapsing-parser source being generated in the
'Data::Page' => '2.00',
'Devel::GlobalDestruction' => '0.09',
'Hash::Merge' => '0.12',
- 'Moo' => '1.006001',
+ 'Moo' => '2.000',
'MRO::Compat' => '0.12',
'Module::Find' => '0.07',
'namespace::clean' => '0.24',
use DBIx::Class::_Util qw(is_exception qsub);
use Scalar::Util qw(weaken blessed reftype);
use Try::Tiny;
-
-# DO NOT edit away without talking to riba first, he will just put it back
-# BEGIN pre-Moo2 import block
-BEGIN {
- my $initial_fatal_bits = (${^WARNING_BITS}||'') & $warnings::DeadBits{all};
-
- local $ENV{PERL_STRICTURES_EXTRA} = 0;
- # load all of these now, so that lazy-loading does not escape
- # the current PERL_STRICTURES_EXTRA setting
- require Sub::Quote;
- require Sub::Defer;
- require Moo;
- require Moo::Object;
- require Method::Generate::Accessor;
- require Method::Generate::Constructor;
-
- Moo->import;
- ${^WARNING_BITS} &= ( $initial_fatal_bits | ~ $warnings::DeadBits{all} );
-}
-# END pre-Moo2 import block
-
+use Moo;
use namespace::clean;
=head1 NAME
use DBIx::Class::_Util qw(sigwarn_silencer qsub);
use IO::Handle ();
-
-# DO NOT edit away without talking to riba first, he will just put it back
-# BEGIN pre-Moo2 import block
-BEGIN {
- my $initial_fatal_bits = (${^WARNING_BITS}||'') & $warnings::DeadBits{all};
-
- local $ENV{PERL_STRICTURES_EXTRA} = 0;
- # load all of these now, so that lazy-loading does not escape
- # the current PERL_STRICTURES_EXTRA setting
- require Sub::Quote;
- require Sub::Defer;
- require Moo;
- require Moo::Object;
- require Method::Generate::Accessor;
- require Method::Generate::Constructor;
-
- Moo->import;
- ${^WARNING_BITS} &= ( $initial_fatal_bits | ~ $warnings::DeadBits{all} );
-}
-# END pre-Moo2 import block
-
+use Moo;
extends 'DBIx::Class';
use namespace::clean;
use Carp 'croak';
use Scalar::Util qw(weaken blessed reftype);
use List::Util qw(first);
-
-# DO NOT edit away without talking to riba first, he will just put it back
-# BEGIN pre-Moo2 import block
-BEGIN {
- my $initial_fatal_bits = (${^WARNING_BITS}||'') & $warnings::DeadBits{all};
-
- local $ENV{PERL_STRICTURES_EXTRA} = 0;
- # load all of these now, so that lazy-loading does not escape
- # the current PERL_STRICTURES_EXTRA setting
- require Sub::Quote;
- require Sub::Defer;
-
- Sub::Quote->import('quote_sub');
- ${^WARNING_BITS} &= ( $initial_fatal_bits | ~ $warnings::DeadBits{all} );
-}
-sub qsub ($) { goto "e_sub } # no point depping on new Moo just for this
-# END pre-Moo2 import block
+use Sub::Quote qw(qsub quote_sub);
use base 'Exporter';
our @EXPORT_OK = qw(
namespace::clean
Try::Tiny
Sub::Name
- strictures
Sub::Defer
Sub::Quote
assert_no_missing_expected_requires();
}
-# make sure we never loaded any of the strictures XS bullshit
-{
- ok( ! exists $INC{ Module::Runtime::module_notional_filename($_) }, "$_ load never attempted" )
- for qw(indirect multidimensional bareword::filehandles);
-}
-
done_testing;
sub register_lazy_loadable_requires {
$tb->note("Auto checked $refs_traced references for leaks - none detected");
}
-# Disable this until better times - SQLT and probably other things
-# still load strictures. Let's just wait until Moo2.0 and go from there
-=begin for tears
# also while we are here and not in plain runmode: make sure we never
# loaded any of the strictures XS bullshit (it's a leak in a sense)
- unless (DBICTest::RunMode->is_plain) {
+ unless (
+ $ENV{MOO_FATAL_WARNINGS}
+ or
+ # FIXME - SQLT loads strictures explicitly, /facedesk
+ # remove this INC check when 0fb58589 and 45287c815 are rectified
+ $INC{'SQL/Translator.pm'}
+ or
+ DBICTest::RunMode->is_plain
+ ) {
for (qw(indirect multidimensional bareword::filehandles)) {
exists $INC{ Module::Runtime::module_notional_filename($_) }
and
$tb->ok(0, "$_ load should not have been attempted!!!" )
}
}
-=cut
-
}
}