]> git.vpit.fr Git - perl/modules/LaTeX-TikZ.git/blobdiff - lib/LaTeX/TikZ/Meta/TypeConstraint/Autocoerce.pm
Fix the autocoercing code with recent versions of Moose
[perl/modules/LaTeX-TikZ.git] / lib / LaTeX / TikZ / Meta / TypeConstraint / Autocoerce.pm
index 0356cb0a29a13da9dbf80ae2415a5bba93194512..7671ade74ddbca7fb9538992ac72bb45ed295e75 100644 (file)
@@ -47,7 +47,9 @@ our $VERSION = '0.02';
       coerce  => 1,
       handles => [ 'id' ],
      );
-     __PACKAGE__->meta->make_immutable;
+     # This class shouldn't be immutable when using Moose, or the
+     # coercing attributes will not be updated with the future coercions.
+     __PACKAGE__->meta->make_immutable if any_moose() ne 'Moose';
     }
 
     # Another class the user wants to use instead of X (cannot be changed)