[Bast-commits] r4758 - in DBIx-Class/0.08/trunk/t: . cdbi-t
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Thu Aug 21 16:22:59 BST 2008
Author: ribasushi
Date: 2008-08-21 16:22:58 +0100 (Thu, 21 Aug 2008)
New Revision: 4758
Modified:
DBIx-Class/0.08/trunk/t/100extra_source.t
DBIx-Class/0.08/trunk/t/94versioning.t
DBIx-Class/0.08/trunk/t/cdbi-t/15-accessor.t
Log:
Properly local()ize several $SIG{__WARN__} handlers
Modified: DBIx-Class/0.08/trunk/t/100extra_source.t
===================================================================
--- DBIx-Class/0.08/trunk/t/100extra_source.t 2008-08-14 22:39:07 UTC (rev 4757)
+++ DBIx-Class/0.08/trunk/t/100extra_source.t 2008-08-21 15:22:58 UTC (rev 4758)
@@ -26,7 +26,7 @@
$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 );
Modified: DBIx-Class/0.08/trunk/t/94versioning.t
===================================================================
--- DBIx-Class/0.08/trunk/t/94versioning.t 2008-08-14 22:39:07 UTC (rev 4757)
+++ DBIx-Class/0.08/trunk/t/94versioning.t 2008-08-21 15:22:58 UTC (rev 4758)
@@ -95,7 +95,7 @@
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');
Modified: DBIx-Class/0.08/trunk/t/cdbi-t/15-accessor.t
===================================================================
--- DBIx-Class/0.08/trunk/t/cdbi-t/15-accessor.t 2008-08-14 22:39:07 UTC (rev 4757)
+++ DBIx-Class/0.08/trunk/t/cdbi-t/15-accessor.t 2008-08-21 15:22:58 UTC (rev 4758)
@@ -213,5 +213,4 @@
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 { };
}
More information about the Bast-commits
mailing list