diff Lib/IMPL/SQL/Schema/Diff.pm @ 315:77df11605d3a

code cleanup
author cin
date Tue, 07 May 2013 02:19:24 +0400
parents 56364d0c4b4f
children
line wrap: on
line diff
--- a/Lib/IMPL/SQL/Schema/Diff.pm	Thu May 02 10:43:49 2013 +0400
+++ b/Lib/IMPL/SQL/Schema/Diff.pm	Tue May 07 02:19:24 2013 +0400
@@ -1,7 +1,7 @@
 package IMPL::SQL::Schema::Diff;
 use strict;
 use warnings;
-use IMPL::lang qw(:compare :hash is);
+use IMPL::lang qw(:compare :hash is typeof);
 
 use IMPL::SQL::Schema::Traits();
 
@@ -172,7 +172,7 @@
         Index , TraitsIndex
     };
     
-    my $class = $map->{$constraint->typeof} or die Exception->new("Can't map the constraint",$constraint->typeof);
+    my $class = $map->{typeof($constraint)} or die Exception->new("Can't map the constraint",typeof($constraint));
     
     if ($class eq TraitsForeignKey) {
         return $class->new(