From: Karen Etheridge Date: Sun, 25 Mar 2012 16:08:38 +0000 (-0700) Subject: another TODO note, re crazy init_arg strings X-Git-Tag: 0.13~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=72f76bd18a4e11dd3edd2b581cb6b0e0898bcc56;p=gitmo%2FMooseX-UndefTolerant.git another TODO note, re crazy init_arg strings --- diff --git a/lib/MooseX/UndefTolerant/Class.pm b/lib/MooseX/UndefTolerant/Class.pm index 1e5e91c..a243605 100644 --- a/lib/MooseX/UndefTolerant/Class.pm +++ b/lib/MooseX/UndefTolerant/Class.pm @@ -21,6 +21,7 @@ around _inline_init_attr_from_constructor => sub { my $type_constraint = $attr->type_constraint; my $tc_says_clean = ($type_constraint && !$type_constraint->check(undef) ? 1 : 0); + # FIXME: not properly sanitizing field names - e.g. consider a field name "Z'ha'dum" return ($tc_says_clean ? ( "if ( exists \$params->{'$init_arg'} && defined \$params->{'$init_arg'} ) {", ) : (),