$new_source->add_column('other_col' => { data_type => 'integer', default_value => 1 });
my $warn = '';
-$SIG{__WARN__} = sub { $warn = shift };
+local $SIG{__WARN__} = sub { $warn = shift };
{
$schema->register_extra_source( 'artist->extra' => $new_source );
my $warn = '';
- $SIG{__WARN__} = sub { $warn = shift };
+ local $SIG{__WARN__} = sub { $warn = shift };
$schema_version = DBICVersion::Schema->connect($dsn, $user, $pass);
like($warn, qr/Your DB is currently unversioned/, 'warning detected without env var or attr');
like $@, qr/read only/, "And can't delete 4 Days in July";
my $abigail = eval { Film->create({ title => "Abigail's Party" }) };
like $@, qr/read only/, "Or create new films";
- $SIG{__WARN__} = sub { };
}