Toby Inkster  committed 4b7a4dc

slightly improve documentation in some Type::Tiny subclasses

  • Participants
  • Parent commits b6f9018
  • Branches default

Comments (0)

Files changed (2)

File lib/Type/Tiny/

 	my $self  = shift;
 	my $class = $self->class;
+	# Some classes (I'm looking at you, Math::BigFloat) include a class in
+	# their @ISA to inherit methods, but then override isa() to return false,
+	# so that they don't appear to be a subclass.
+	#
+	# In these cases, we don't want to list the parent class as a parent
+	# type constraint.
+	#
 	my @isa = grep $class->isa($_), do { no strict "refs"; no warnings; @{"$class\::ISA"} };
 	if (@isa == 0)

File lib/Type/Tiny/

 =item C<coercion>
-Will typically be a L<Type::Coercion::Union>.
+You probably do not pass this to the constructor. (It's not currently
+disallowed, as there may be a use for it that I haven't thought of.)
+The auto-generated default will be a L<Type::Coercion::Union> object.