From: Naveed Massjouni <naveedm9@gmail.com>
Date: Sat, 7 Sep 2013 08:30:11 +0000 (-0400)
Subject: Fixed the example showing parameter type constraints
X-Git-Tag: v1.0301~8
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6865b43c9c231602cece6e47702f9e587d276dbb;p=p5sagit%2FFunction-Parameters.git

Fixed the example showing parameter type constraints

String is not a Moose::Util::TypeConstraints type. To make the example
work, it needs to be Str.
See https://metacpan.org/module/Moose::Util::TypeConstraints
---

diff --git a/lib/Function/Parameters.pm b/lib/Function/Parameters.pm
index 51679df..4bd2e1c 100644
--- a/lib/Function/Parameters.pm
+++ b/lib/Function/Parameters.pm
@@ -746,7 +746,7 @@ types. That is, before each parameter you can put a type specification
 consisting of identifiers (C<Foo>), unions (C<... | ...>), and parametric types
 (C<...[...]>). Example:
 
-  fun foo(Int $n, ArrayRef[String | CodeRef] $cb) { ... }
+  fun foo(Int $n, ArrayRef[Str | CodeRef] $cb) { ... }
 
 If you do this, the type reification function corresponding to the keyword will
 be called to turn the type (a string) into a constraint object. The default