requires 'Scope::Guard' => 0;
requires 'List::MoreUtils' => 0;
requires 'Exporter' => '5.63';
+requires 'Try::Tiny' => 0;
install_script 'script/dbicdump';
use Scalar::Util 'looks_like_number';
use File::Slurp 'slurp';
use DBIx::Class::Schema::Loader::Utils 'split_name';
+use Try::Tiny;
require DBIx::Class;
use namespace::clean;
local *Class::C3::reinitialize = sub {};
use warnings;
- if ($class->can('meta') && (ref $class->meta)->isa('Moose::Meta::Class')) {
+ if ($class->can('meta') && try { (ref $class->meta)->isa('Moose::Meta::Class') }) {
$class->meta->make_mutable;
}
Class::Unload->unload($class) if $unload;
&& ($resultset_class ne 'DBIx::Class::ResultSet')
) {
my $has_file = Class::Inspector->loaded_filename($resultset_class);
- if ($resultset_class->can('meta') && (ref $resultset_class->meta)->isa('Moose::Meta::Class')) {
+ if ($resultset_class->can('meta') && try { (ref $resultset_class->meta)->isa('Moose::Meta::Class') }) {
$resultset_class->meta->make_mutable;
}
Class::Unload->unload($resultset_class) if $unload;