Subject: | slurpy Dict[ foo => InstanceOf["bar"] ] fails (due to unescaped quotes in throw?) |
The generated source starts with:
sub { no warnings; my (@R, %tmp, $tmp);
#placeholder
$_ = (($#_-0)%2)==0 ? "Type::Exception::WrongNumberOfParameters"->throw(message => "Odd number of elements in Dict[search_criteria=>InstanceOf["TigerLead::MLS::ListingSearch::Criteria"]]") : +{ @_[0..$#_] };
...
Note the quotes in the throw message, which leads to much unhappiness...
Failed to compile source because: syntax error at parameter validation for 'TigerLead::MLS::ListingSearch::Executor::execute' line 3, near ""Odd number of elements in Dict[search_criteria=>InstanceOf["TigerLead::MLS::ListingSearch::Criteria"
Global symbol "$tmp" requires explicit package name at parameter validation for 'TigerLead::MLS::ListingSearch::Executor::execute' line 4.
Global symbol "$tmp" requires explicit package name at parameter validation for 'TigerLead::MLS::ListingSearch::Executor::execute' line 5.
Global symbol "$tmp" requires explicit package name at parameter validation for 'TigerLead::MLS::ListingSearch::Executor::execute' line 5.
Global symbol "$tmp" requires explicit package name at parameter validation for 'TigerLead::MLS::ListingSearch::Executor::execute' line 5.
Global symbol "$tmp" requires explicit package name at parameter validation for 'TigerLead::MLS::ListingSearch::Executor::execute' line 5.
Global symbol "$tmp" requires explicit package name at parameter validation for 'TigerLead::MLS::ListingSearch::Executor::execute' line 5.
Global symbol "$tmp" requires explicit package name at parameter validation for 'TigerLead::MLS::ListingSearch::Executor::execute' line 5.
Global symbol "@R" requires explicit package name at parameter validation for 'TigerLead::MLS::ListingSearch::Executor::execute' line 6.
Global symbol "$tmp" requires explicit package name at parameter validation for 'TigerLead::MLS::ListingSearch::Executor::execute' line 6.
Global symbol "@R" requires explicit package name at parameter validation for 'TigerLead::MLS::ListingSearch::Executor::execute' line 7.
syntax error at parameter validation for 'TigerLead::MLS::ListingSearch::Executor::execute' line 8, near ";
}"
parameter validation for 'TigerLead::MLS::ListingSearch::Executor::execute' has too many errors. at /home/tim/trunk/comp/mls_listing_search/lib/TigerLead/MLS/ListingSearch/Executor.pm line 78.