]> Dogcows Code - chaz/p5-DBIx-Class-ResultSet-RecursiveUpdate/commitdiff
use Carp::Clan instead of warn
authorAlexander Hartmaier <abraxxa@cpan.org>
Sat, 23 Oct 2010 09:39:34 +0000 (11:39 +0200)
committerAlexander Hartmaier <abraxxa@cpan.org>
Sat, 23 Oct 2010 09:39:34 +0000 (11:39 +0200)
dist.ini
lib/DBIx/Class/ResultSet/RecursiveUpdate.pm
t/lib/RunTests.pm

index d98cf8399e71fc594866050399acf92460bfdec8..03ff85e05beca59fb92c1fbaed8fa443a26b0606 100644 (file)
--- a/dist.ini
+++ b/dist.ini
@@ -40,6 +40,7 @@ DateTime  = 0
 DBD::SQLite = 1.21
 Readonly = 1.03
 List::MoreUtils = 0.22
+Carp::Clan = 6.04
 
 [Prereqs / TestRequires]
 Test::More = 0.88
index 6594748e721544db60aa244af7541f3d4599bcb0..4e4c370ea4c972b900660cc90938b1aa9b2e2845 100644 (file)
@@ -34,7 +34,7 @@ sub recursive_update {
 }
 
 package DBIx::Class::ResultSet::RecursiveUpdate::Functions;
-use Carp;
+use Carp::Clan;
 use Scalar::Util qw( blessed );
 use List::MoreUtils qw/ any /;
 
@@ -145,7 +145,7 @@ sub recursive_update {
 
         # don't throw a warning instead of an exception to give users
         # time to adapt to the new API
-        warn(
+        carp(
             "No such column, relationship, many-to-many helper accessor or generic accessor '$name'"
         ) unless $unknown_params_ok;
 
index 7121ed27add86d4f6c6a1bfc5634582d63c63af0..3dba310caf704abd9953ca0f6d6545f9c5edca3a 100644 (file)
@@ -59,10 +59,10 @@ sub run_tests {
 # qr/No such column, relationship, many-to-many helper accessor or generic accessor 'nonexisting'/,
 # 'nonexisting column, accessor, relationship fails'
 # );
-    warning_is {
+    warning_like {
         my $user = $user_rs->recursive_update($updates);
     }
-    "No such column, relationship, many-to-many helper accessor or generic accessor 'nonexisting'",
+    qr/No such column, relationship, many-to-many helper accessor or generic accessor 'nonexisting'/,
         'nonexisting column, accessor, relationship warns';
     $expected_user_count++;
     is( $user_rs->count, $expected_user_count, 'User created' );
This page took 0.025242 seconds and 4 git commands to generate.